Skip to content

Commit

Permalink
feat(fields): read/set all the fields from the given struct
Browse files Browse the repository at this point in the history
refactor
  • Loading branch information
bkrukowski committed Oct 1, 2024
1 parent 8677e45 commit 832c63f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fields/iterate.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func iterate(strct any, cfg *config, path []reflect.StructField) error {
return nil
}

func trySetValue(
func trySetValue( //nolint:ireturn
f reflect.StructField,
value any,
cfg *config,
Expand Down
2 changes: 1 addition & 1 deletion internal/reflect/iterate.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func IterateFields(strct any, callback FieldCallback, convert bool, convertToPtr
return nil
}

func valueFromField(strct reflect.Value, i int) any {
func valueFromField(strct reflect.Value, i int) any { //nolint:ireturn
f := strct.Field(i)

if !f.CanSet() { // handle unexported fields
Expand Down

0 comments on commit 832c63f

Please sign in to comment.