Feat: works on my machine

This commit is contained in:
2025-10-16 05:07:56 +08:00
commit 5bbab63a2c
37 changed files with 4553 additions and 0 deletions

30
cmd.go Normal file
View File

@@ -0,0 +1,30 @@
package main
import (
"strings"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
var RootCmd = &cobra.Command{
Use: "game",
PersistentPreRun: func(cmd *cobra.Command, args []string) {
viper.AutomaticEnv()
viper.SetEnvKeyReplacer(strings.NewReplacer("_", "-"))
viper.BindPFlags(cmd.PersistentFlags())
viper.BindPFlags(cmd.Flags())
},
}
func main() {
RootCmd.Execute()
}
func init() {
cobra.EnableTraverseRunHooks = true
RootCmd.AddCommand(authCmd)
RootCmd.AddCommand(playerCmd)
RootCmd.AddCommand(testCmd)
}