MCPcopy Create free account
hub / github.com/dropbox/dbxcli / NewVersionCommand

Function NewVersionCommand

cmd/version.go:42–52  ·  view source on GitHub ↗

NewVersionCommand creates the version command. The version value is supplied by main so release builds can continue setting it with ldflags.

(version string)

Source from the content-addressed store, hash-verified

40// NewVersionCommand creates the version command. The version value is supplied
41// by main so release builds can continue setting it with ldflags.
42func NewVersionCommand(version string) *cobra.Command {
43 versionCmd := &cobra.Command{
44 Use: "version",
45 Short: "Print version information",
46 RunE: func(cmd *cobra.Command, args []string) error {
47 return versionCommand(cmd, version)
48 },
49 }
50 enableStructuredOutput(versionCmd)
51 return versionCmd
52}
53
54func versionCommand(cmd *cobra.Command, version string) error {
55 info := newVersionOutput(version)

Calls 2

versionCommandFunction · 0.85
enableStructuredOutputFunction · 0.85