17 lines
230 B
Go
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)
|
|
}
|