feat:完善项目信息
This commit is contained in:
32
cmd/cmd.go
Normal file
32
cmd/cmd.go
Normal file
@ -0,0 +1,32 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"SciencesServer/cmd/migrate"
|
||||
"SciencesServer/cmd/serve"
|
||||
"fmt"
|
||||
"github.com/spf13/cobra"
|
||||
"os"
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "science",
|
||||
Short: "Science manage server",
|
||||
SilenceUsage: true,
|
||||
DisableAutoGenTag: true,
|
||||
Long: "Science manage server",
|
||||
Version: "v1.0",
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(migrate.Cmd)
|
||||
rootCmd.AddCommand(serve.Cmd)
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
err := rootCmd.Execute()
|
||||
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user