mirror of
https://github.com/rclone/rclone.git
synced 2025-12-16 08:13:29 +00:00
15
vendor/github.com/spf13/cobra/doc/util.go
generated
vendored
15
vendor/github.com/spf13/cobra/doc/util.go
generated
vendored
@@ -13,7 +13,11 @@
|
||||
|
||||
package doc
|
||||
|
||||
import "github.com/spf13/cobra"
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// Test to see if we have a reason to print See Also information in docs
|
||||
// Basically this is a test for a parent commend or a subcommand which is
|
||||
@@ -31,6 +35,15 @@ func hasSeeAlso(cmd *cobra.Command) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Temporary workaround for yaml lib generating incorrect yaml with long strings
|
||||
// that do not contain \n.
|
||||
func forceMultiLine(s string) string {
|
||||
if len(s) > 60 && !strings.Contains(s, "\n") {
|
||||
s = s + "\n"
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
type byName []*cobra.Command
|
||||
|
||||
func (s byName) Len() int { return len(s) }
|
||||
|
||||
Reference in New Issue
Block a user