Skip to content

Commit

Permalink
fix (isNil): handle array properly
Browse files Browse the repository at this point in the history
you can't call reflect.Value.IsNil on an array
  • Loading branch information
jimlambrt committed Jul 28, 2024
1 parent cf2eba7 commit 2d5c356
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rw.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func isNil(i interface{}) bool {
return true
}
switch reflect.TypeOf(i).Kind() {
case reflect.Ptr, reflect.Map, reflect.Array, reflect.Chan, reflect.Slice:
case reflect.Ptr, reflect.Map, reflect.Chan, reflect.Slice:
return reflect.ValueOf(i).IsNil()
}
return false
Expand Down

0 comments on commit 2d5c356

Please sign in to comment.