Add golangci-lint workflow (#4999)

* fix lint workflow

* add golang lint

* close http response body
This commit is contained in:
andrew_li
2022-06-29 11:58:36 +08:00
committed by GitHub
parent f1e06466df
commit f289795312
141 changed files with 311 additions and 592 deletions

View File

@@ -227,6 +227,7 @@ func (v *VirtualServiceController) syncService(key string) error {
}
// default component name to service name
//nolint:ineffassign,staticcheck
appName := name
defer func() {
@@ -322,7 +323,6 @@ func (v *VirtualServiceController) syncService(key string) error {
switch strategies[0].Spec.StrategyPolicy {
case servicemeshv1alpha2.PolicyPause:
vs.Spec = v.generateDefaultVirtualServiceSpec(name, subsets, service).Spec
break
case servicemeshv1alpha2.PolicyWaitForWorkloadReady:
set := v.getSubsets(strategies[0])