cli: fix lint error in commands\docs.go (#5929)

https://github.com/hasura/graphql-engine/pull/5929
This commit is contained in:
Yash Saravgi 2020-10-22 12:35:32 +05:30 committed by GitHub
parent 9332521f95
commit 72b1d01ca7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,7 +85,7 @@ func printOptionsReST(buf *bytes.Buffer, cmd *cobra.Command, name string) error
return nil
}
// linkHandler for default ReST hyperlink markup
/* linkHandler for default ReST hyperlink markup
func defaultLinkHandler(name, ref string) string {
return fmt.Sprintf("`%s <%s.rst>`_", name, ref)
}
@ -93,7 +93,7 @@ func defaultLinkHandler(name, ref string) string {
// genReST creates reStructured Text output.
func genReST(cmd *cobra.Command, w io.Writer, titlePrefix string) error {
return genReSTCustom(cmd, w, titlePrefix, defaultLinkHandler)
}
}*/
// genReSTCustom creates custom reStructured Text output.
func genReSTCustom(cmd *cobra.Command, w io.Writer, titlePrefix string, linkHandler func(string, string) string) error {
@ -177,11 +177,11 @@ func genReSTCustom(cmd *cobra.Command, w io.Writer, titlePrefix string, linkHand
// This function may not work correctly if your command names have `-` in them.
// If you have `cmd` with two subcmds, `sub` and `sub-third`,
// and `sub` has a subcommand called `third`, it is undefined which
// help output will be in the file `cmd-sub-third.1`.
/* help output will be in the file `cmd-sub-third.1`.
func genReSTTree(cmd *cobra.Command, dir, titlePrefix string) error {
emptyStr := func(s string) string { return "" }
return genReSTTreeCustom(cmd, dir, titlePrefix, emptyStr, defaultLinkHandler)
}
}*/
// genReSTTreeCustom is the the same as genReSTTree, but
// with custom filePrepender and linkHandler.
@ -245,13 +245,13 @@ func hasSeeAlso(cmd *cobra.Command) bool {
}
// Temporary workaround for yaml lib generating incorrect yaml with long strings
// that do not contain \n.
/* 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