1
1
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
|||||||
"public/tools"
|
"public/tools"
|
||||||
|
|
||||||
"github.com/xie1xiao1jun/gorm-tools/data/config"
|
"github.com/xie1xiao1jun/gorm-tools/data/config"
|
||||||
|
"github.com/xie1xiao1jun/gorm-tools/data/view/gtools"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"gopkg.in/go-playground/validator.v9"
|
"gopkg.in/go-playground/validator.v9"
|
||||||
@@ -18,7 +19,7 @@ var rootCmd = &cobra.Command{
|
|||||||
Short: "gorm mysql reflect tools",
|
Short: "gorm mysql reflect tools",
|
||||||
Long: `base on gorm tools for mysql database to golang struct`,
|
Long: `base on gorm tools for mysql database to golang struct`,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
|
gtools.Execute()
|
||||||
//开始做事情
|
//开始做事情
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -58,7 +59,7 @@ func initConfig() {
|
|||||||
fmt.Println("error info: ", err, err)
|
fmt.Println("error info: ", err, err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
} else {
|
} else {
|
||||||
fmt.Println("using config info.")
|
fmt.Println("using config info:")
|
||||||
fmt.Println(tools.GetJsonStr(config.GetMysqlDbInfo()))
|
fmt.Println(tools.GetJsonStr(config.GetMysqlDbInfo()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1
data/view/gtools/common.go
Normal file
1
data/view/gtools/common.go
Normal file
@@ -0,0 +1 @@
|
|||||||
|
package gtools
|
||||||
1
data/view/gtools/def.go
Normal file
1
data/view/gtools/def.go
Normal file
@@ -0,0 +1 @@
|
|||||||
|
package gtools
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package gtools
|
||||||
|
|
||||||
|
//开始执行
|
||||||
|
func Execute() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user