mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 16:00:24 +08:00 
			
		
		
		
	优化代码
This commit is contained in:
		@@ -12,8 +12,6 @@ import (
 | 
			
		||||
	"strings"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var db *dbs.DB
 | 
			
		||||
 | 
			
		||||
// 数据库节点相关服务
 | 
			
		||||
type DBNodeService struct {
 | 
			
		||||
	BaseService
 | 
			
		||||
@@ -108,7 +106,7 @@ func (this *DBNodeService) ListEnabledDBNodes(ctx context.Context, req *pb.ListE
 | 
			
		||||
 | 
			
		||||
		// 是否能够连接
 | 
			
		||||
		if node.IsOn == 1 {
 | 
			
		||||
			db, err = dbs.NewInstanceFromConfig(node.DBConfig())
 | 
			
		||||
			db, err := dbs.NewInstanceFromConfig(node.DBConfig())
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				status.Error = err.Error()
 | 
			
		||||
			} else {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user