From f9e7823c147e0eec57bb57b63d0253854a10cb60 Mon Sep 17 00:00:00 2001 From: John Date: Sun, 16 Feb 2020 16:36:39 +0800 Subject: [PATCH] improve configuration for package gdb --- frame/gins/gins.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frame/gins/gins.go b/frame/gins/gins.go index c013aa89e..f29044776 100644 --- a/frame/gins/gins.go +++ b/frame/gins/gins.go @@ -14,6 +14,7 @@ import ( "fmt" "github.com/gogf/gf/internal/intlog" "github.com/gogf/gf/net/ghttp" + "github.com/gogf/gf/text/gstr" "github.com/gogf/gf/util/gutil" "github.com/gogf/gf/os/gfile" @@ -255,8 +256,8 @@ func parseDBConfigNode(value interface{}) *gdb.ConfigNode { if node.LinkInfo != "" && node.Type == "" { match, _ := gregex.MatchString(`([a-z]+):(.+)`, node.LinkInfo) if len(match) == 3 { - node.Type = match[1] - node.LinkInfo = match[2] + node.Type = gstr.Trim(match[1]) + node.LinkInfo = gstr.Trim(match[2]) } } return node