Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/provider/secretmanager…
Browse files Browse the repository at this point in the history
…/cloud-google-com-go-3d4bf0d4c5
  • Loading branch information
ktong authored Nov 18, 2024
2 parents cc55344 + a9870ff commit 3b77fa5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@ linters:
- gosmopolitan
- govet
- grouper
- iface
- importas
- inamedparam
- ineffassign
- interfacebloat
# intrange // go 1.22
- intrange
- ireturn
- lll
# loggercheck
Expand All @@ -118,6 +119,7 @@ linters:
- promlinter
- protogetter
- reassign
- recvcheck
- revive
- rowserrcheck
- sloglint
Expand Down Expand Up @@ -155,6 +157,7 @@ issues:
- contextcheck
- cyclop
- err113
- errcheck
- forcetypeassert
- funlen
- gochecknoglobals
Expand Down
6 changes: 3 additions & 3 deletions internal/convert/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ func (c Converter) convertArray(name string, fromVal, toVal reflect.Value) error

toVal.SetZero()
errs := make([]error, 0, toVal.Len())
for i := 0; i < fromVal.Len(); i++ {
for i := range fromVal.Len() {
fieldName := name + "[" + strconv.Itoa(i) + "]"
fromElemVal := fromVal.Index(i)
toElemVal := toVal.Index(i)
Expand Down Expand Up @@ -412,7 +412,7 @@ func (c Converter) convertSlice(name string, fromVal, toVal reflect.Value) error
toVal.SetCap(fromVal.Len())

errs := make([]error, 0, toVal.Len())
for i := 0; i < fromVal.Len(); i++ {
for i := range fromVal.Len() {
fieldName := name + "[" + strconv.Itoa(i) + "]"
fromElemVal := fromVal.Index(i)
toElemVal := toVal.Index(i)
Expand Down Expand Up @@ -499,7 +499,7 @@ func (c Converter) convertStruct(name string, fromVal, toVal reflect.Value) erro
structs = structs[1:]

structType := structVal.Type()
for i := 0; i < structType.NumField(); i++ {
for i := range structType.NumField() {
fieldType := structType.Field(i)
fieldVal := structVal.Field(i)
if !fieldVal.CanSet() {
Expand Down
2 changes: 1 addition & 1 deletion provider/flag/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func isZeroValue(flg *flag.Flag) bool {
val = reflect.Zero(typ)
}

return flg.DefValue == val.Interface().(flag.Value).String() //nolint:forcetypeassert
return flg.DefValue == val.Interface().(flag.Value).String() //nolint:errcheck,forcetypeassert
}

func (f Flag) String() string {
Expand Down

0 comments on commit 3b77fa5

Please sign in to comment.