mirror of
https://github.com/hanzoai/o11y.git
synced 2026-10-15 12:58:33 +00:00
* chore(lint): enable godot and staticcheck * chore(lint): merge main and fix new lint issues in main
22 lines
435 B
Go
22 lines
435 B
Go
package units
|
|
|
|
// throughputConverter is an implementation of Converter that converts throughput.
|
|
type throughputConverter struct {
|
|
}
|
|
|
|
func NewThroughputConverter() Converter {
|
|
return &throughputConverter{}
|
|
}
|
|
|
|
func (*throughputConverter) Name() string {
|
|
return "throughput"
|
|
}
|
|
|
|
func (c *throughputConverter) Convert(v Value, to Unit) Value {
|
|
// There is no conversion to be done for throughput
|
|
return Value{
|
|
F: v.F,
|
|
U: to,
|
|
}
|
|
}
|