Skip to content

Commit

Permalink
fix: type alias sets
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Mar 9, 2019
1 parent 36203e8 commit 3927f89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion env.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func set(field reflect.Value, refType reflect.StructField, value string, funcMap
if err != nil {
return fmt.Errorf("parser error: %v", err)
}
field.Set(reflect.ValueOf(val))
field.Set(reflect.ValueOf(val).Convert(field.Type()))
return nil
}

Expand Down

0 comments on commit 3927f89

Please sign in to comment.