fix issue in template for ghttp.Server

This commit is contained in:
John
2019-10-17 20:31:03 +08:00
parent 97fe8235da
commit 500efb5601
14 changed files with 107 additions and 5 deletions

View File

@ -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{} {