Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Datarate ¶
Datarate wraps a github.com/martinlindhe/unit.Datarate and extends it with new functionality. It is now parsable from strings and yaml
func Parse ¶
Parse reads a string in the format "<number><unit>/<duration>" and produces a Datarate object. Since data rates are usually metric (base 10), we only support those. eg. megabit/s, not mebibit/s Example: datarate.Parse("10KB/s") // 10 kilobyte per second Bad Example: data.Parse("10KiB/s") // error: kibibytes not supported
func (*Datarate) UnmarshalYAML ¶
Click to show internal directories.
Click to hide internal directories.