Files
o11y/pkg/units/converter_bool.go
Vikrant GuptaandGitHub fa38f8b7cc chore(lint): enable godot and staticcheck (#10775)
* chore(lint): enable godot and staticcheck

* chore(lint): merge main and fix new lint issues in main
2026-03-31 09:11:49 +00:00

21 lines
365 B
Go

package units
// 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,
}
}