Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogFormat ¶
type LogFormat string
LogFormat determines the output format of the log stream
const JSONLogFormat LogFormat = "json"
const KeyValueLogFormat LogFormat = "keyvalue"
const PlainLogFormat LogFormat = "plain"
type TimeFormat ¶
type TimeFormat string
TimeFormat is a timestamp format string that also accepts the following RFC names as shortcuts
ANSIC = "Mon Jan _2 15:04:05 2006" UnixDate = "Mon Jan _2 15:04:05 MST 2006" RubyDate = "Mon Jan 02 15:04:05 -0700 2006" RFC822 = "02 Jan 06 15:04 MST" RFC822Z = "02 Jan 06 15:04 -0700" // RFC822 with numeric zone RFC850 = "Monday, 02-Jan-06 15:04:05 MST" RFC1123 = "Mon, 02 Jan 2006 15:04:05 MST" RFC1123Z = "Mon, 02 Jan 2006 15:04:05 -0700" // RFC1123 with numeric zone RFC3339 = "2006-01-02T15:04:05Z07:00" RFC3339Nano = "2006-01-02T15:04:05.999999999Z07:00"
Any string is accepted
type TimestampFlag ¶
type TimestampFlag string
TimestampFlag implements the Value interface to accept and validate a RFC3339 timestamp string as a flag
func (TimestampFlag) AsTime ¶
func (t TimestampFlag) AsTime() time.Time
AsTime returns the underlying time instance
func (*TimestampFlag) Set ¶
func (t *TimestampFlag) Set(value string) error
Set implements pflag.Value
Click to show internal directories.
Click to hide internal directories.