Prechádzať zdrojové kódy

fields isObject bugfix

0x4a52466c696e74 2 týždňov pred
rodič
commit
97ac1ff7c6
2 zmenil súbory, kde vykonal 3 pridanie a 3 odobranie
  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 {