frostfs-node/internal/metrics/types.go
Dmitrii Stepanov 81ea91de52 [#451] metrics: Move to internal
`metrics` don't look like something others want to import.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-06-25 08:52:37 +00:00

17 lines
230 B
Go

package metrics
import (
"strconv"
)
type NullBool struct {
Bool bool
Valid bool // Valid is true if Bool is not NULL
}
func (v NullBool) String() string {
if !v.Valid {
return ""
}
return strconv.FormatBool(v.Bool)
}