package cmd import ( "github.com/spf13/cobra" ) var CmdPlay = &cobra.Command{ Use: "play", Short: "Linke the Go Playground, but running at our application eontext", Run: runPlay, } // 调试用,完成后删除 func runPlay(cmd *cobra.Command, args []string) { //redis.Redis.Set("hello", "hi form redis", 10*time.Second) //console.Success(redis.Redis.Get("hello")) }