forked from mirror/gorm
initialize plugins map
This commit is contained in:
parent
f4bfc435cc
commit
1df757113a
4
gorm.go
4
gorm.go
|
@ -87,6 +87,10 @@ func Open(dialector Dialector, config *Config) (db *DB, err error) {
|
||||||
config.Dialector = dialector
|
config.Dialector = dialector
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if config.Plugins == nil {
|
||||||
|
config.Plugins = map[string]Plugin{}
|
||||||
|
}
|
||||||
|
|
||||||
if config.cacheStore == nil {
|
if config.cacheStore == nil {
|
||||||
config.cacheStore = &sync.Map{}
|
config.cacheStore = &sync.Map{}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue