兼容代码生成

This commit is contained in:
linwenxiang committed 2021-02-25 14:24:09 +08:00
1 parent 78671ae99e
commit 734a48dbb8
2 files changed
+1 -6

No files matched your search

+1 -1
View File
@@ -58,7 +58,7 @@ func Setup(f func(opts ...source.Option) source.Source, options ...source.Option
Ssl: SslConfig,
Logger: LoggerConfig,
Jwt: JwtConfig,
Database: new(Database),
Database: DatabaseConfig,
Databases: &DatabasesConfig,
Gen: GenConfig,
Extend: ExtendConfig,
-5
View File
@@ -1,7 +1,5 @@
package config
import "gorm.io/plugin/dbresolver"
type Database struct {
Driver string
Source string
@@ -22,7 +20,4 @@ type DBResolverConfig struct {
var (
DatabaseConfig = new(Database)
DatabasesConfig = make(map[string]*Database)
Policies = map[string]dbresolver.Policy{
"random": dbresolver.RandomPolicy{},
}
)