File tree Expand file tree Collapse file tree 6 files changed +11
-7
lines changed
Expand file tree Collapse file tree 6 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 4141 - uses : actions/checkout@v4
4242 - uses : actions/setup-go@v5
4343 with :
44- go-version : ' 1.22 '
44+ go-version : ' 1.24 '
4545 - name : golangci-lint
4646 uses : golangci/golangci-lint-action@v7
4747 with :
48- version : v1.60
48+ version : v2.0
Original file line number Diff line number Diff line change 1+ //nolint:errcheck
12package log
23
34import (
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ func TestIsTerminal(t *testing.T) {
2323 // signal.Ignore(syscall.SIGSYS)
2424
2525 // Mute "function not implemented" and "undefined: syscall.SIGSYS" for non linux_amd64 platforms
26- if ! (runtime .GOOS == "linux" && runtime .GOARCH == "amd64" ) {
26+ if ! (runtime .GOOS == "linux" && runtime .GOARCH == "amd64" ) { //nolint:staticcheck
2727 return
2828 }
2929
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ type IOWriteCloser struct {
6767
6868// WriteEntry implements Writer.
6969func (w IOWriteCloser ) WriteEntry (e * Entry ) (n int , err error ) {
70- return w .WriteCloser .Write (e .buf )
70+ return w .WriteCloser .Write (e .buf ) //nolint:staticcheck
7171}
7272
7373// Close implements Writer.
@@ -480,11 +480,12 @@ func (l *Logger) header(level Level) *Entry {
480480 }
481481 offset := timeOffset
482482 if l .TimeLocation != nil {
483- if l .TimeLocation == time .UTC {
483+ switch l .TimeLocation {
484+ case time .UTC :
484485 offset = 0
485- } else if l . TimeLocation == time .Local {
486+ case time .Local :
486487 offset = timeOffset
487- } else {
488+ default :
488489 format := l .TimeFormat
489490 if format == "" {
490491 format = "2006-01-02T15:04:05.999Z07:00"
Original file line number Diff line number Diff line change 1+ //nolint:staticcheck
12package log
23
34import (
Original file line number Diff line number Diff line change 11//go:build go1.21
22
3+ //nolint:staticcheck
34package log
45
56import (
You can’t perform that action at this time.
0 commit comments