diff --git a/.github/workflows/kit.yml b/.github/workflows/kit.yml index cf3916a..11082ac 100644 --- a/.github/workflows/kit.yml +++ b/.github/workflows/kit.yml @@ -53,7 +53,7 @@ jobs: if: matrix.target_arch == 'amd64' && matrix.target_os == 'linux' uses: golangci/golangci-lint-action@v3.2.0 with: - version: ${{ env.GOLANGCILINT_VER }} + version: ${{ env.GOLANGCI_LINT_VER }} skip-cache: true - name: Run make go.mod check-diff if: matrix.target_arch != 'arm' diff --git a/.golangci.yml b/.golangci.yml index 9af614a..4d99406 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -247,7 +247,29 @@ linters: - exhaustive - noctx - gci -issues: - exclude: - # staticcheck - - 'SA1019: package github.com/golang/protobuf/proto is deprecated: Use the "google.golang.org/protobuf/proto" package instead' + - golint + - tparallel + - paralleltest + - wrapcheck + - tagliatelle + - ireturn + - exhaustivestruct + - errchkjson + - contextcheck + - gomoddirectives + - godot + - cyclop + - varnamelen + - gosec + - errorlint + - forcetypeassert + - ifshort + - maintidx + - nilnil + - predeclared + - tenv + - thelper + - wastedassign + - containedctx + - gosimple + - forbidigo diff --git a/config/decode.go b/config/decode.go index 1f3f56c..2198323 100644 --- a/config/decode.go +++ b/config/decode.go @@ -58,10 +58,7 @@ func Decode(input interface{}, output interface{}) error { } // nolint:cyclop -func decodeString( - f reflect.Type, - t reflect.Type, - data interface{}) (interface{}, error) { +func decodeString(f reflect.Type, t reflect.Type, data any) (any, error) { if t.Kind() == reflect.String && f.Kind() != reflect.String { return fmt.Sprintf("%v", data), nil } @@ -78,7 +75,7 @@ func decodeString( return nil, errors.Errorf("expected string: got %s", reflect.TypeOf(data)) } - var result interface{} + var result any var decoder StringDecoder if t.Implements(typeStringDecoder) { diff --git a/logger/dapr_logger.go b/logger/dapr_logger.go index 988a29b..b9ec021 100644 --- a/logger/dapr_logger.go +++ b/logger/dapr_logger.go @@ -28,7 +28,7 @@ type daprLogger struct { logger *logrus.Entry } -var DaprVersion string = "unknown" +var DaprVersion = "unknown" func newDaprLogger(name string) *daprLogger { newLogger := logrus.New() diff --git a/logger/options.go b/logger/options.go index d4ce6bf..ce97cdc 100644 --- a/logger/options.go +++ b/logger/options.go @@ -52,7 +52,8 @@ func (o *Options) SetAppID(id string) { // AttachCmdFlags attaches log options to command flags. func (o *Options) AttachCmdFlags( stringVar func(p *string, name string, value string, usage string), - boolVar func(p *bool, name string, value bool, usage string)) { + boolVar func(p *bool, name string, value bool, usage string), +) { if stringVar != nil { stringVar( &o.OutputLevel,