Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Commit

Permalink
cherry-pick pr 329 (#338)
Browse files Browse the repository at this point in the history
Signed-off-by: wangyike <[email protected]>
  • Loading branch information
wangyikewxgm authored May 28, 2021
1 parent 933e0f3 commit 276c8c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ linters-settings:

gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 15
min-complexity: 17

maligned:
# print struct with more effective memory layout or not, false by default
Expand Down
3 changes: 3 additions & 0 deletions pkg/controller/v1alpha2/applicationconfiguration/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ type workloads struct {
}

func (a *workloads) Apply(ctx context.Context, status []v1alpha2.WorkloadStatus, w []Workload, ao ...resource.ApplyOption) error {
if len(w) == 0 {
return errors.New("The number of workloads in appConfig is 0")
}
// they are all in the same namespace
var namespace = w[0].Workload.GetNamespace()
for _, wl := range w {
Expand Down

0 comments on commit 276c8c5

Please sign in to comment.