feat:完善项目信息

This commit is contained in:
henry
2021-12-28 09:18:32 +08:00
parent 24806c5d80
commit 76ca837fd6
9 changed files with 288 additions and 78 deletions

32
cmd/cmd.go Normal file
View 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)
}
}