sesamy-cli/cmd/version.go
Kevin Franklin Kim 330257f61a
wip: refactor
2024-05-21 16:29:07 +02:00

26 lines
353 B
Go

package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
var version = "latest"
func NewVersionCmd(root *cobra.Command) {
cmd := &cobra.Command{
Use: "version",
Short: "show version information",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(version)
},
}
root.AddCommand(cmd)
}
func init() {
NewVersionCmd(rootCmd)
}