mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-15 11:31:47 +08:00
21 lines
368 B
Go
21 lines
368 B
Go
package converter
|
|
|
|
// boolConverter is a Converter implementation for bool
|
|
type boolConverter struct{}
|
|
|
|
func NewBoolConverter() Converter {
|
|
return &boolConverter{}
|
|
}
|
|
|
|
func (*boolConverter) Name() string {
|
|
return "bool"
|
|
}
|
|
|
|
func (c *boolConverter) Convert(v Value, to Unit) Value {
|
|
// There is no conversion to be done for bool
|
|
return Value{
|
|
F: v.F,
|
|
U: to,
|
|
}
|
|
}
|