29 lines
518 B
Go
29 lines
518 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/spf13/cobra"
|
|
"tss-rocks-be/cmd"
|
|
)
|
|
|
|
var rootCmd = &cobra.Command{
|
|
Use: "app",
|
|
Short: "TSS backend application",
|
|
Long: `TSS (The Starset Society) backend application.
|
|
It provides both API endpoints and admin tools for content management.`,
|
|
}
|
|
|
|
func init() {
|
|
// 添加子命令
|
|
rootCmd.AddCommand(cmd.GetUserCmd())
|
|
rootCmd.AddCommand(cmd.GetServerCmd())
|
|
}
|
|
|
|
func main() {
|
|
if err := rootCmd.Execute(); err != nil {
|
|
fmt.Fprintln(os.Stderr, err)
|
|
os.Exit(1)
|
|
}
|
|
}
|