We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 699c9ae commit f8ce68fCopy full SHA for f8ce68f
Makefile
@@ -44,7 +44,6 @@ site-docs: site
44
git -C site pull
45
git -C site rm 'manual/gh*.md' 2>/dev/null || true
46
go run ./cmd/gen-docs --website --doc-path site/manual
47
- for f in site/manual/gh*.md; do sed -i.bak -e '/^### SEE ALSO/,$$d' "$$f"; done
48
rm -f site/manual/*.bak
49
git -C site add 'manual/gh*.md'
50
git -C site commit -m 'update help docs' || true
internal/docs/markdown.go
@@ -6,7 +6,6 @@ import (
6
"io"
7
"os"
8
"path/filepath"
9
- "sort"
10
"strings"
11
12
"github.com/spf13/cobra"
@@ -63,30 +62,6 @@ func GenMarkdownCustom(cmd *cobra.Command, w io.Writer, linkHandler func(string)
63
62
if err := printOptions(buf, cmd, name); err != nil {
64
return err
65
}
66
- if hasSeeAlso(cmd) {
67
- buf.WriteString("### SEE ALSO\n\n")
68
- if cmd.HasParent() {
69
- parent := cmd.Parent()
70
- pname := parent.CommandPath()
71
- link := pname + ".md"
72
- link = strings.Replace(link, " ", "_", -1)
73
- buf.WriteString(fmt.Sprintf("* [%s](%s)\t - %s\n", pname, linkHandler(link), parent.Short))
74
- }
75
-
76
- children := cmd.Commands()
77
- sort.Sort(byName(children))
78
79
- for _, child := range children {
80
- if !child.IsAvailableCommand() || child.IsAdditionalHelpTopicCommand() {
81
- continue
82
83
- cname := name + " " + child.Name()
84
- link := cname + ".md"
85
86
- buf.WriteString(fmt.Sprintf("* [%s](%s)\t - %s\n", cname, linkHandler(link), child.Short))
87
88
- buf.WriteString("\n")
89
90
_, err := buf.WriteTo(w)
91
92
internal/docs/markdown_test.go
@@ -22,8 +22,6 @@ func TestGenMdDoc(t *testing.T) {
22
checkStringContains(t, output, echoCmd.Example)
23
checkStringContains(t, output, "boolone")
24
checkStringContains(t, output, "rootflag")
25
- checkStringContains(t, output, rootCmd.Short)
26
- checkStringContains(t, output, echoSubCmd.Short)
27
checkStringOmits(t, output, deprecatedCmd.Short)
28
checkStringContains(t, output, "Options inherited from parent commands")
29
@@ -59,8 +57,6 @@ func TestGenMdNoHiddenParents(t *testing.T) {
59
57
60
58
61
checkStringOmits(t, output, "rootflag")
checkStringOmits(t, output, "Options inherited from parent commands")
0 commit comments