新增系统设置接口

This commit is contained in:
wxb committed 2020-08-07 10:22:52 +08:00
commit 389d2970c0
150 files changed
+21555

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
package version
import (
"fmt"
"github.com/spf13/cobra"
"go-admin/global"
)
var (
configYml string
port string
mode string
StartCmd = &cobra.Command{
Use: "version",
Short: "Get version info",
Example: "go-admin version",
PreRun: func(cmd *cobra.Command, args []string) {
},
RunE: func(cmd *cobra.Command, args []string) error {
return run()
},
}
)
func run() error {
fmt.Println(global.Version)
return nil
}