MCPcopy Create free account
hub / github.com/caarlos0/tasktimer / newManCmd

Function newManCmd

internal/cmd/man.go:16–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14}
15
16func newManCmd() *manCmd {
17 root := &manCmd{}
18 cmd := &cobra.Command{
19 Use: "man",
20 Short: "Generates tt's command line manpages",
21 SilenceUsage: true,
22 DisableFlagsInUseLine: true,
23 Hidden: true,
24 Args: cobra.NoArgs,
25 RunE: func(cmd *cobra.Command, args []string) error {
26 manPage, err := mcobra.NewManPage(1, root.cmd.Root())
27 if err != nil {
28 return err
29 }
30
31 _, err = fmt.Fprint(os.Stdout, manPage.Build(roff.NewDocument()))
32 return err
33 },
34 }
35
36 root.cmd = cmd
37 return root
38}

Callers 1

newRootCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected