Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
func NewEncoder ¶
func NewEncoder(opt ...EncoderOption) Encoder
NewEncoder creates a new encoder with the following default conversions: - float NaN/Inf are converted to nil - zero time.Time are converted to nil - durations are converted to seconds using WithDuration() - fmt.Stringer are converted to string - time.Time are converted to RFC3339 string
type EncoderOption ¶
type EncoderOption func(*encoder)
func WithDuration ¶
func WithDuration() EncoderOption
Click to show internal directories.
Click to hide internal directories.