mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-18 07:56:56 +00:00
17 lines
312 B
Go
17 lines
312 B
Go
|
|
package converter
|
||
|
|
|
||
|
|
// boolConverter is a Converter implementation for bool
|
||
|
|
type boolConverter struct{}
|
||
|
|
|
||
|
|
func NewBoolConverter() Converter {
|
||
|
|
return &boolConverter{}
|
||
|
|
}
|
||
|
|
|
||
|
|
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,
|
||
|
|
}
|
||
|
|
}
|