Closed atombrella closed 2 years ago
I had a look at https://goreportcard.com/report/github.com/zegl/kube-score and don't really understand why go vet doesn't find anything. There are several of this kind:
parser/parse.go:236:8: composites: `github.com/zegl/kube-score/parser/internal/pod.Pod` composite literal uses unkeyed fields (govet)
p := internalpod.Pod{pod, fileLocation}
^
Build succeeded:
I experimented a bit with various linters from https://golangci-lint.run/ and found a couple of fairly trivial things to fix/optimize.
strings.EqualFold
is quite a bit faster compared than usingtoLower()
https://hackernoon.com/optimizing-string-comparisons-in-go-7h1b3udmI'm not sure how you feel about sorting go imports.
In
score/score_test.go
this bit is marked as dead code.Thanks for a neat tool :tada: