mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
fix issue in template for ghttp.Server
This commit is contained in:
@ -230,7 +230,7 @@ func New(name ...string) (db DB, err error) {
|
||||
// which is DEFAULT_GROUP_NAME in default.
|
||||
func Instance(name ...string) (db DB, err error) {
|
||||
group := configs.defaultGroup
|
||||
if len(name) > 0 {
|
||||
if len(name) > 0 && name[0] != "" {
|
||||
group = name[0]
|
||||
}
|
||||
v := instances.GetOrSetFuncLock(group, func() interface{} {
|
||||
|
||||
Reference in New Issue
Block a user