Skip to content

Commit

Permalink
💄
Browse files Browse the repository at this point in the history
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
  • Loading branch information
ItalyPaleAle committed Jul 26, 2022
1 parent 3d4402e commit b7837f4
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/kit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
30 changes: 26 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 2 additions & 5 deletions config/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion logger/dapr_logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion logger/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b7837f4

Please sign in to comment.