Skip to content

Commit 0f75059

Browse files
authored
Merge pull request #5938 from thaJeztah/man_cleans
man: fix minor linting issues
2 parents ecfdf74 + 5185ab8 commit 0f75059

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

man/generate.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
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

65
package 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 {

man/tools.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build tools
2-
// +build tools
32

43
package main
54

0 commit comments

Comments
 (0)