Skip to content

Commit bdab251

Browse files
committed
man: prevent cobra "source" comment
Cobra sets a default Source if none is set; header.Source = "Auto generated by spf13/cobra" Set our own Source for the man pages we generate. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 4ff7f62 commit bdab251

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

clidocstool_man.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ func (c *Client) GenManTree(cmd *cobra.Command) error {
4141
now := time.Unix(unixEpoch, 0)
4242
c.manHeader.Date = &now
4343
}
44-
44+
if c.manHeader.Source == "" {
45+
c.manHeader.Source = "Generated by github.com/docker/cli-docs-tool"
46+
}
4547
return c.genManTreeCustom(cmd)
4648
}
4749

0 commit comments

Comments
 (0)