File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11// This file is intended for use with "go run"; it isn't really part of the package.
22
33//go:build manpages
4- // +build manpages
54
65package main
76
@@ -63,16 +62,18 @@ func generateManPages(opts *options) error {
6362 })
6463}
6564
66- func loadLongDescription (cmd * cobra.Command , path string ) error {
67- for _ , cmd := range cmd .Commands () {
65+ func loadLongDescription (parentCommand * cobra.Command , path string ) error {
66+ for _ , cmd := range parentCommand .Commands () {
6867 cmd .DisableFlagsInUseLine = true
6968 if cmd .Name () == "" {
7069 continue
7170 }
7271 fullpath := filepath .Join (path , cmd .Name ()+ ".md" )
7372
7473 if cmd .HasSubCommands () {
75- loadLongDescription (cmd , filepath .Join (path , cmd .Name ()))
74+ if err := loadLongDescription (cmd , filepath .Join (path , cmd .Name ())); err != nil {
75+ return err
76+ }
7677 }
7778
7879 if _ , err := os .Stat (fullpath ); err != nil {
Original file line number Diff line number Diff line change 11//go:build tools
2- // +build tools
32
43package main
54
You can’t perform that action at this time.
0 commit comments