feat:Code generation configuration item

This commit is contained in:
wenjianzhang
2020-07-22 17:21:47 +08:00
parent 0ac2c2a423
commit 3846a95f12
+17
View File
@@ -0,0 +1,17 @@
package config
import "github.com/spf13/viper"
type Gen struct {
DBName string
FrontPath string
}
func InitGen(cfg *viper.Viper) *Gen {
return &Gen{
DBName: cfg.GetString("dbname"),
FrontPath: cfg.GetString("frontpath"),
}
}
var GenConfig = new(Gen)