Skip to content

Commit

Permalink
hack/tools enable additional linter in golangci-lint
Browse files Browse the repository at this point in the history
Enables linter gocritic with two checks enabled for a subset of the project

Kubernetes-commit: 21fa8d12bbd74e1d3e6dcac007ab398b4a368368
  • Loading branch information
oscr authored and k8s-publishing-bot committed Oct 21, 2022
1 parent b6a5653 commit 8dd401d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/resource/scheme.go
Expand Up @@ -41,7 +41,7 @@ func (dynamicCodec) Decode(data []byte, gvk *schema.GroupVersionKind, obj runtim
return nil, nil, err
}

if strings.ToLower(gvk.Kind) == "status" && gvk.Version == "v1" && (gvk.Group == "" || gvk.Group == "meta.k8s.io") {
if strings.EqualFold(gvk.Kind, "status") && gvk.Version == "v1" && (gvk.Group == "" || gvk.Group == "meta.k8s.io") {
if _, ok := obj.(*metav1.Status); !ok {
obj = &metav1.Status{}
err := json.Unmarshal(data, obj)
Expand Down

0 comments on commit 8dd401d

Please sign in to comment.