Documentation
¶
Index ¶
- type Duration
- func (duration Duration) MarshalJSON() ([]byte, error)
- func (duration Duration) MarshalText() (text []byte, err error)
- func (duration Duration) MarshalYAML() (interface{}, error)
- func (duration *Duration) UnmarshalJSON(bytes []byte) error
- func (duration *Duration) UnmarshalText(text []byte) error
- func (duration *Duration) UnmarshalYAML(unmarshal func(interface{}) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Duration ¶
Duration is a wrap of time.duration for supporting Marshal and Unmarshal
func NewDuration ¶
NewDuration create new instance of duration
func ParseDuration ¶
ParseDuration parses a duration string
func (Duration) MarshalJSON ¶
MarshalJSON is implement for converting duration to json string
func (Duration) MarshalText ¶
MarshalText convert duration to text
func (Duration) MarshalYAML ¶
MarshalYAML convert duration to yaml
func (*Duration) UnmarshalJSON ¶
UnmarshalJSON is implement for json string to duration
func (*Duration) UnmarshalText ¶
UnmarshalText convert text to duration
func (*Duration) UnmarshalYAML ¶
UnmarshalYAML convert yaml to duration
Click to show internal directories.
Click to hide internal directories.