mirror of
https://github.com/Telecominfraproject/wlan-cloud-kube-state-metrics.git
synced 2025-10-30 02:02:25 +00:00
Harden and add gosec linter
Remediate: G104: Errors unhandled. G109: Potential Integer overflow made by strconv.Atoi result conversion to int16/32 G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server G304: Potential file inclusion via variable G601: Implicit memory aliasing in for loop. Signed-off-by: Manuel Rüger <manuel@rueg.eu>
This commit is contained in:
@@ -40,9 +40,12 @@ var (
|
||||
func TestBuilderWithCustomStore(t *testing.T) {
|
||||
b := builder.NewBuilder()
|
||||
b.WithFamilyGeneratorFilter(generator.NewCompositeFamilyGeneratorFilter())
|
||||
b.WithEnabledResources([]string{"pods"})
|
||||
b.WithGenerateStoresFunc(customStore)
|
||||
err := b.WithEnabledResources([]string{"pods"})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
b.WithGenerateStoresFunc(customStore)
|
||||
var fStores []*fakeStore
|
||||
for _, stores := range b.BuildStores() {
|
||||
for _, store := range stores {
|
||||
|
||||
Reference in New Issue
Block a user