mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 10:13:01 +00:00
feat:Code generation configuration item
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user