Documentation
¶
Overview ¶
Package timestamper provides an io.Writer that adds timestamps at the beginning of each line of output.
Index ¶
Constants ¶
View Source
const DefaultFormat = "01/02/06 15:04:05.000"
DefaultFormat for the date and time prepended to each line of a TimeWriter.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is an io.Writer preceding each line in the output with the current time and date. See also time.Format.
func New ¶
New returns a new Writer object that time stamps each line of output and uses the default date and time format "01/02/06 15:04:05.999". See also time.Format.
func NewWithFormat ¶
NewWithFormat returns a new Writer object hat time stamps each line of output and uses the specified date and time format.
Click to show internal directories.
Click to hide internal directories.