fixup! Don't crash on non-existent path values
This commit is contained in:
parent
63d2138ee4
commit
08c4765d5f
|
|
@ -434,7 +434,7 @@ func (c compiledGauge) value(it interface{}) (*eachValue, error) {
|
||||||
if it == nil {
|
if it == nil {
|
||||||
return nil, fmt.Errorf("got nil while resolving path")
|
return nil, fmt.Errorf("got nil while resolving path")
|
||||||
}
|
}
|
||||||
// Don't error if there was not a type-casting issue (`toFloat64`), but rather a failed lookup.
|
// Don't error if there was not a type-casting issue (`toFloat64`).
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
value, err := toFloat64(got, c.NilIsZero)
|
value, err := toFloat64(got, c.NilIsZero)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue