Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDuration ¶
FormatDuration formats a duration, use the follwing format: %X Total Time elapsed. (85:30:04) %Xf Total Time with Microseconds elapsed. (85:30:04.999999) %Xn Total Time with Nanoseconds elapsed. (85:30:04.999999999) %% A literal '%' character. (%)
func FormatTime ¶
FormatTime formats a time, use the follwing format: %a Weekday as locale’s abbreviated name. (Sun, Mon, ..., Sat) %A Weekday as locale’s full name. (Sunday, Monday, ..., Saturday) %w Weekday as a decimal number, where 0 is Sunday and 6 is Saturday (0, 1, ..., 6) %d Day of the month as a decimal number. (1, 2, ..., 31) %b Month as locale’s abbreviated name. (Jan, Feb, ..., Dec) %B Month as locale’s full name. (January, February, ..., December) %m Month as a decimal number. (1, 2, ..., 12) %y Year without century as a decimal number. (0, 1, ..., 99) %Y Year with century as a decimal number. (1970, 1988, 2001, 2013) %H Hour (24-hour clock) as a decimal number. (0, 1, ..., 23) %I Hour (12-hour clock) as a decimal number. (1, 2, ..., 12) %p Meridian indicator. (AM, PM) %M Minute as a decimal number. (0, 1, ..., 59) %S Second as a decimal number. (0, 1, ..., 59) %f Microsecond as a decimal number. (0, 1, ..., 999999) %z UTC offset in the form +HHMM or -HHMM (+0000) %Z Time zone name (UTC) %j Day of the year as a decimal number (1, 2, ..., 366) %U Week number of the year (Sunday as the first day of the week) as a decimal number. All days in a new year preceding the first Sunday are considered to be in week 0.
(0, 1, ..., 53)
%W Week number of the year (Monday as the first day of the week) as a decimal number. All days in a new year preceding the first Monday are considered to be in week 0.
(0, 1, ..., 53)
%c Date and time representation. (Tue Aug 16 21:30:00 1988) %x Date representation. (08/16/88) %X Time representation. (21:30:00) %% A literal '%' character. (%)
Types ¶
type ColorCorrection ¶
type ColorCorrection int
const ( Disabled ColorCorrection = iota Enabled Alternate )
type FormatFunc ¶
type FormatFunc func() string
type PrefixReader ¶
type PrefixReader struct { Format FormatFunc ColorCorrection ColorCorrection io.Reader // contains filtered or unexported fields }