Initial commit

This commit is contained in:
2023-07-22 06:32:44 +00:00
commit 9bb2865a65
15 changed files with 964 additions and 0 deletions

24
cmd/version.go Normal file
View File

@@ -0,0 +1,24 @@
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
var (
// Version is set at compile time.
Version = "dev"
)
func init() {
rootCmd.AddCommand(versionCmd)
}
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(Version)
},
}