Skip to content

Commit

Permalink
MarshalText behavior update on invalid Extrema
Browse files Browse the repository at this point in the history
  • Loading branch information
m-posluszny committed Jan 18, 2024
1 parent 1ebe38c commit c8d68cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/metric/metricdata/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ type Extrema[N int64 | float64] struct {
// MarshalText converts the Extrema value to text.
func (e Extrema[N]) MarshalText() ([]byte, error) {
if !e.valid {
return []byte("0"), nil
return nil, nil
}
return json.Marshal(e.value)
}
Expand Down

0 comments on commit c8d68cb

Please sign in to comment.