mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
29 lines
546 B
Go
29 lines
546 B
Go
package main
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
cfgFile string
|
|
|
|
rootCmd = &cobra.Command{
|
|
Use: "ShadowEditor",
|
|
Short: "3d scene editor based on three.js",
|
|
Long: `ShadowEditor is a 3d scene editor based on three.js.
|
|
This application uses mongodb to store data.`,
|
|
}
|
|
)
|
|
|
|
// Execute executes the root command.
|
|
func Execute() error {
|
|
return rootCmd.Execute()
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "./config.toml", "config file")
|
|
|
|
rootCmd.AddCommand(serveCmd)
|
|
rootCmd.AddCommand(versionCmd)
|
|
}
|