From c27a60248febedd9d1e43bd369688a859f87addb Mon Sep 17 00:00:00 2001 From: phuslu Date: Tue, 23 Apr 2024 21:56:03 +0800 Subject: [PATCH] go mod tidy and gofmt -s -w --- README.md | 2 +- console.go | 3 ++- file.go | 2 +- logger.go | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 301cf994..087f4824 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ type Logger struct { // If set to `TimeFormatUnix/TimeFormatUnixMs`, timestamps will be formatted. TimeFormat string - // TimeLocation specifices that the location of TimeFormat used. Uses time.Local if empty. + // TimeLocation specifies that the location of TimeFormat used. Uses time.Local if empty. TimeLocation *time.Location // Writer specifies the writer of output. It uses a wrapped os.Stderr Writer in if empty. diff --git a/console.go b/console.go index 68cb22b9..a1a35854 100644 --- a/console.go +++ b/console.go @@ -16,7 +16,8 @@ func IsTerminal(fd uintptr) bool { // IMPORTANT: Don't use ConsoleWriter on critical path of a high concurrency and low latency application. // // Default output format: -// {Time} {Level} {Goid} {Caller} > {Message} {Key}={Value} {Key}={Value} +// +// {Time} {Level} {Goid} {Caller} > {Message} {Key}={Value} {Key}={Value} // // Note: The performance of ConsoleWriter is not good enough, because it will // parses JSON input into structured records, then output in a specific order. diff --git a/file.go b/file.go index c4410e6a..234f060e 100644 --- a/file.go +++ b/file.go @@ -23,7 +23,7 @@ import ( // `/var/log/foo/server.log`, a backup created at 6:30pm on Nov 11 2016 would // use the filename `/var/log/foo/server.2016-11-04T18-30-00.log` // -// Cleaning Up Old Log Files +// # Cleaning Up Old Log Files // // Whenever a new logfile gets created, old log files may be deleted. The most // recent files according to filesystem modified time will be retained, up to a diff --git a/logger.go b/logger.go index d8e5bf20..45568432 100644 --- a/logger.go +++ b/logger.go @@ -86,7 +86,7 @@ type Logger struct { // If set with `TimeFormatUnix`, `TimeFormatUnixMs`, times are formated as UNIX timestamp. TimeFormat string - // TimeLocation specifices that the location which TimeFormat used. It uses time.Local if empty. + // TimeLocation specifies that the location which TimeFormat used. It uses time.Local if empty. TimeLocation *time.Location // Context specifies an optional context of logger.