MCPcopy
hub / github.com/dnote/dnote / NewCmd

Function NewCmd

pkg/cli/cmd/version/version.go:26–37  ·  view source on GitHub ↗

NewCmd returns a new version command

(ctx context.DnoteCtx)

Source from the content-addressed store, hash-verified

24
25// NewCmd returns a new version command
26func NewCmd(ctx context.DnoteCtx) *cobra.Command {
27 cmd := &cobra.Command{
28 Use: "version",
29 Short: "Print the version number of Dnote",
30 Long: "Print the version number of Dnote",
31 Run: func(cmd *cobra.Command, args []string) {
32 fmt.Printf("dnote %s\n", ctx.Version)
33 },
34 }
35
36 return cmd
37}

Callers 1

mainFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected