mirror of
https://github.com/astaxie/beego.git
synced 2025-07-06 15:50:18 +00:00
code style simplify
This commit is contained in:
@ -39,7 +39,7 @@ func Register(name string, adapter Config) {
|
||||
if adapter == nil {
|
||||
panic("config: Register adapter is nil")
|
||||
}
|
||||
if _, dup := adapters[name]; dup {
|
||||
if _, ok := adapters[name]; ok {
|
||||
panic("config: Register called twice for adapter " + name)
|
||||
}
|
||||
adapters[name] = adapter
|
||||
|
Reference in New Issue
Block a user