瀏覽代碼

fields isObject bugfix

0x4a52466c696e74 2 周之前
父節點
當前提交
97ac1ff7c6
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 2
      application/application.go
  2. 1 1
      fielder.go

+ 2 - 2
application/application.go

@@ -11,8 +11,8 @@ import (
 
 func New(appConf *AppConfig, swaggerConf *SwaggerConf, ctx context.Context) rest.IApplication {
 	app := &Application{
-		conf:    appConf,
-		Sockets: NewSockets(),
+		conf: appConf,
+		//Sockets: NewSockets(),
 	}
 	if swaggerConf != nil && swaggerConf.Enabled {
 		app.swagger = NewSwagger(swaggerConf)

+ 1 - 1
fielder.go

@@ -46,7 +46,7 @@ func (s *Field) IsEmpty() bool {
 }
 
 func (s *Field) IsObject() bool {
-	return len(s.Names) == 0
+	return len(s.Names) > 0
 }
 
 func (s *Field) String() string {