Add golangci-lint workflow (#4999)
* fix lint workflow * add golang lint * close http response body
This commit is contained in:
@@ -32,7 +32,7 @@ func Parse(reader io.Reader, namespace, rlsName string, local bool) ([]*resource
|
||||
klog.Infof("parse resources, namespace: %s, release: %s", namespace, rlsName)
|
||||
start := time.Now()
|
||||
defer func() {
|
||||
klog.Infof("parse resources end, namespace: %s, release: %s, cost: %v", namespace, rlsName, time.Now().Sub(start))
|
||||
klog.Infof("parse resources end, namespace: %s, release: %s, cost: %v", namespace, rlsName, time.Since(start))
|
||||
}()
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ func Parse(reader io.Reader, namespace, rlsName string, local bool) ([]*resource
|
||||
f := cmdutil.NewFactory(matchVersionKubeConfigFlags)
|
||||
builder := f.NewBuilder().Unstructured().NamespaceParam(namespace).ContinueOnError().Stream(reader, rlsName).Flatten()
|
||||
|
||||
if local == true {
|
||||
if local {
|
||||
builder = builder.Local()
|
||||
}
|
||||
r := builder.Do()
|
||||
@@ -50,7 +50,7 @@ func Parse(reader io.Reader, namespace, rlsName string, local bool) ([]*resource
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if local == false {
|
||||
if !local {
|
||||
for i := range infos {
|
||||
infos[i].Namespace = namespace
|
||||
err := infos[i].Get()
|
||||
|
||||
Reference in New Issue
Block a user