新增系统设置接口
This commit is contained in:
commit
389d2970c0
150 files changed
+21555
No files matched your search
@@ -0,0 +1,19 @@
|
||||
package config
|
||||
|
||||
import "github.com/spf13/viper"
|
||||
|
||||
type Database struct {
|
||||
Driver string
|
||||
Source string
|
||||
}
|
||||
|
||||
func InitDatabase(cfg *viper.Viper) *Database {
|
||||
|
||||
db := &Database{
|
||||
Driver: cfg.GetString("driver"),
|
||||
Source: cfg.GetString("source"),
|
||||
}
|
||||
return db
|
||||
}
|
||||
|
||||
var DatabaseConfig = new(Database)
|
||||
Reference in new issue
Block a user