Skip to content

Commit

Permalink
Fix setDefaultValue.
Browse files Browse the repository at this point in the history
  • Loading branch information
onrik committed Nov 10, 2022
1 parent 50cf1df commit 8b89983
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions default.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import (
)

func setDefaultValue(v reflect.Value) error {
if v.Type().Kind() == reflect.Ptr {
v = v.Elem()
}

for i := 0; i < v.Type().NumField(); i++ {
f := v.Type().Field(i)
if !f.IsExported() {
Expand Down

0 comments on commit 8b89983

Please sign in to comment.