Compare commits
2 Commits
28f72917b8
...
d8aab7f5c4
| Author | SHA1 | Date | |
|---|---|---|---|
| d8aab7f5c4 | |||
| 5f15ebd967 |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -81,7 +81,7 @@ jobs:
|
||||
- name: Run golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: latest
|
||||
version: v1.64.8
|
||||
args: --timeout=5m
|
||||
|
||||
build:
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# golangci-lint configuration
|
||||
# See https://golangci-lint.run/usage/configuration/
|
||||
|
||||
version: 2
|
||||
|
||||
run:
|
||||
timeout: 5m
|
||||
tests: true
|
||||
@@ -47,6 +49,5 @@ issues:
|
||||
- revive
|
||||
|
||||
output:
|
||||
format: colored-line-number
|
||||
print-issued-lines: true
|
||||
print-linter-name: true
|
||||
|
||||
@@ -52,9 +52,20 @@ func ErrorLog(msg string, fields ...Field) {
|
||||
// Used as a fallback when no global logger is set.
|
||||
type noOpLogger struct{}
|
||||
|
||||
func (n *noOpLogger) Debug(_ string, _ ...Field) {}
|
||||
func (n *noOpLogger) Info(_ string, _ ...Field) {}
|
||||
func (n *noOpLogger) Warn(_ string, _ ...Field) {}
|
||||
func (n *noOpLogger) Error(_ string, _ ...Field) {}
|
||||
func (n *noOpLogger) With(_ ...Field) Logger { return n }
|
||||
// Debug implements Logger.Debug as a no-op.
|
||||
func (n *noOpLogger) Debug(_ string, _ ...Field) {}
|
||||
|
||||
// Info implements Logger.Info as a no-op.
|
||||
func (n *noOpLogger) Info(_ string, _ ...Field) {}
|
||||
|
||||
// Warn implements Logger.Warn as a no-op.
|
||||
func (n *noOpLogger) Warn(_ string, _ ...Field) {}
|
||||
|
||||
// Error implements Logger.Error as a no-op.
|
||||
func (n *noOpLogger) Error(_ string, _ ...Field) {}
|
||||
|
||||
// With implements Logger.With as a no-op.
|
||||
func (n *noOpLogger) With(_ ...Field) Logger { return n }
|
||||
|
||||
// WithContext implements Logger.WithContext as a no-op.
|
||||
func (n *noOpLogger) WithContext(_ context.Context) Logger { return n }
|
||||
|
||||
Reference in New Issue
Block a user