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
Issue tracker is used for reporting bugs and discussing new features. Please use Discord or stackoverflow for supporting issues.
/* type Cursor struct { ID models.ID `msgpack:"i"` Value Value `msgpack:"v,omitempty"` } */ func TestMsgPackPanic(t *testing.T) { var v Value v = (*time.Time)(nil) c := &Cursor{ Value: v, } log.Println("OK Here") _ = msgpack.NewEncoder(bytes.NewBuffer(nil)).Encode(v) log.Println("Next panic") _ = msgpack.NewEncoder(bytes.NewBuffer(nil)).Encode(c) }
panic here
func isEmptyValue(v reflect.Value) bool { if z, ok := v.Interface().(isZeroer); ok { return nilable(v.Kind()) && v.IsNil() || z.IsZero() }
improve isEmptyValue
code above
The text was updated successfully, but these errors were encountered:
unwrap type to detect nil ptr prevent panic fix vmihailenco#306
392199c
52b4cd1
Merge pull request #307 from wenerme/unwrap
da62e6f
unwrap type to detect nil ptr prevent panic fix #306
No branches or pull requests
Issue tracker is used for reporting bugs and discussing new features. Please use
Discord or stackoverflow for supporting
issues.
Expected Behavior
Current Behavior
panic here
Possible Solution
improve isEmptyValue
Steps to Reproduce
code above
Context (Environment)
Detailed Description
Possible Implementation
The text was updated successfully, but these errors were encountered: