Explorar o código

remove nil services check (#3277)

* define types at api layer and remove cli import

* check for null map

* explicit ifs

* remove nil services check
ianedwards %!s(int64=2) %!d(string=hai) anos
pai
achega
e40a2dc27c
Modificáronse 2 ficheiros con 0 adicións e 9 borrados
  1. 0 5
      api/server/handlers/porter_app/parse.go
  2. 0 4
      cli/cmd/apply.go

+ 0 - 5
api/server/handlers/porter_app/parse.go

@@ -168,11 +168,6 @@ func parse(conf ParseConf) (*chart.Chart, map[string]interface{}, map[string]int
 		services = parsed.Services
 	}
 
-	if services == nil {
-		return nil, nil, nil, fmt.Errorf("missing services from porter yaml file")
-	}
-
-
 	application := &Application{
 		Env:      parsed.Env,
 		Services: services,

+ 0 - 4
cli/cmd/apply.go

@@ -201,10 +201,6 @@ func apply(_ *types.GetAuthenticatedUserResponse, client *api.Client, _ []string
 				services = parsed.Services
 			}
 
-			if services == nil {
-				return fmt.Errorf("missing services from porter yaml file")
-			}
-
 			app := &stack.Application{
 				Env:      parsed.Env,
 				Services: services,