We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ac0f9f commit 8b3929dCopy full SHA for 8b3929d
x/bsonx/bsoncore/value.go
@@ -190,7 +190,7 @@ func (v Value) AsInt64OK() (int64, bool) {
190
// will panic.
191
func (v Value) AsFloat64() float64 {
192
if !v.IsNumber() {
193
- return 0
+ panic(ElementTypeError{"bsoncore.Value.AsFloat64", v.Type})
194
}
195
var f64 float64
196
switch v.Type {
0 commit comments