Documentation ¶
Overview ¶
helpers/helpers.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvOrDefault ¶ added in v0.1.39
GetEnvOrDefault returns the value of an environment variable or a default value.
func ParseISO8601Date ¶
ParseISO8601Date attempts to parse a string date in ISO 8601 format.
Types ¶
type JSONDuration ¶ added in v0.1.39
JSONDuration wraps time.Duration for custom JSON unmarshalling.
func ParseJSONDuration ¶ added in v0.1.39
func ParseJSONDuration(value string, defaultVal JSONDuration) JSONDuration
ParseJSONDuration attempts to parse a string value as a duration and returns the result or a default value.
func (JSONDuration) Duration ¶ added in v0.1.39
func (d JSONDuration) Duration() time.Duration
Duration returns the time.Duration value.
func (JSONDuration) String ¶ added in v0.1.39
func (d JSONDuration) String() string
MarshalJSON returns the JSON representation of the duration.
func (*JSONDuration) UnmarshalJSON ¶ added in v0.1.39
func (d *JSONDuration) UnmarshalJSON(b []byte) error
UnmarshalJSON parses the duration from JSON string.
Click to show internal directories.
Click to hide internal directories.