Documentation ¶
Index ¶
- Constants
- type Duration
- func (d Duration) Days() float64
- func (d Duration) Go() time.Duration
- func (d Duration) Int() int64
- func (d Duration) MarshalJSON() ([]byte, error)
- func (d Duration) MarshalYAML() (interface{}, error)
- func (d *Duration) Scan(value any) (err error)
- func (d Duration) String() string
- func (d *Duration) UnmarshalJSON(p []byte) error
- func (d *Duration) UnmarshalYAML(fn func(interface{}) error) error
- func (d Duration) Value() (driver.Value, error)
Constants ¶
View Source
const Day = time.Hour * 24
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Duration ¶
type Duration int64
func ParseDuration ¶
ParseDuration parses a duration string. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
func (Duration) MarshalJSON ¶
func (Duration) MarshalYAML ¶
func (*Duration) UnmarshalJSON ¶
func (*Duration) UnmarshalYAML ¶
Click to show internal directories.
Click to hide internal directories.