We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type Thingy struct { Context context.Context }
func (obj *Thingy) SetDefaults() { if defaults.CanUpdate(obj.Context) { // panic obj.Context = context.Background() } }
panic: reflect: call of reflect.Value.Type on zero Value reflect.Value.typeSlow /usr/local/go/src/reflect/value.go:2634 reflect.Value.Type /usr/local/go/src/reflect/value.go:2629 github.com/creasty/defaults.isInitialValue /usr/root/function/vendor/github.com/creasty/defaults/defaults.go:221 github.com/creasty/defaults.CanUpdate /usr/root/function/vendor/github.com/creasty/defaults/defaults.go:243 function/internal/common/utils.(*InvokeOpts).SetDefaults /usr/root/function/internal/common/utils/invoke.go:33 github.com/creasty/defaults.callSetter /usr/root/function/vendor/github.com/creasty/defaults/setter.go:10 github.com/creasty/defaults.Set /usr/root/function/vendor/github.com/creasty/defaults/defaults.go:42
// creasty/defaults/defaults.go#220 func isInitialValue(field reflect.Value) bool { return reflect.DeepEqual(reflect.Zero(field.Type()).Interface(), field.Interface()) }
The text was updated successfully, but these errors were encountered:
hi btw, i like ur lib ❤️
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: