diff --git a/.golangci.yml b/.golangci.yml index d2962a3..c2ddcae 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,17 +1,20 @@ run: timeout: 5m tests: false - skip-files: + +issues.skip-files: - 'internal/config/http_config.go' - 'internal/config/config.go' linters: enable-all: true disable: + - execinquery + - exportloopref + - godot - cyclop - depguard - dupl - - exhaustivestruct - exhaustruct - forbidigo - forcetypeassert @@ -19,7 +22,7 @@ linters: - gochecknoglobals - gochecknoinits - godox - - goerr113 + - err113 - gofumpt - gomnd - mnd diff --git a/cmd/config.go b/cmd/config.go index f598303..7eed600 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -38,7 +38,7 @@ func loadFromEnv(config interface{}) { configValue := reflect.ValueOf(config).Elem() configType := configValue.Type() - for i := 0; i < configValue.NumField(); i++ { + for i := range configValue.NumField() { field := configType.Field(i) tag := field.Tag.Get("env") diff --git a/go.mod b/go.mod index fea890f..c09c8fd 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/NETWAYS/check_elasticsearch -go 1.21 +go 1.22 require ( github.com/NETWAYS/go-check v0.6.2