[teamai] Push 87 resource(s) from XingfenD

This commit is contained in:
2026-09-10 16:10:45 +08:00
parent 425c9c078a
commit 65c04def51
1314 changed files with 211681 additions and 0 deletions
@@ -0,0 +1,31 @@
// cmd/myapp/serve.go
package main
import (
"fmt"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
var serveCmd = &cobra.Command{
Use: "serve",
Short: "Start the HTTP server",
RunE: func(cmd *cobra.Command, args []string) error {
port := viper.GetInt("port")
fmt.Fprintf(cmd.OutOrStdout(), "listening on :%d\n", port)
// start server...
return nil
},
}
func init() {
rootCmd.AddCommand(serveCmd)
serveCmd.Flags().IntP("port", "p", 8080, "port to listen on")
viper.BindPFlag("port", serveCmd.Flags().Lookup("port"))
}
// For command groups, use AddGroup and set GroupID on commands:
//
// rootCmd.AddGroup(&cobra.Group{ID: "management", Title: "Management Commands:"})
// serveCmd.GroupID = "management"