MCPcopy Create free account
hub / github.com/avamsi/climate / versionCommand

Function versionCommand

command.go:104–115  ·  view source on GitHub ↗
(name, v string)

Source from the content-addressed store, hash-verified

102}
103
104func versionCommand(name, v string) *cobra.Command {
105 help := fmt.Sprintf("Display %v's version information", name)
106 return &cobra.Command{
107 Use: "version",
108 Short: help,
109 Long: help + ".",
110 Args: cobra.ExactArgs(0),
111 Run: func(cmd *cobra.Command, _ []string) {
112 cmd.Println(v)
113 },
114 }
115}
116
117func (cmd *command) run(ctx context.Context) error {
118 normalize := func(_ *pflag.FlagSet, name string) pflag.NormalizedName {

Callers 1

runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected