Skip to content

Commit cd6622e

Browse files
committed
Add nop logger
1 parent 3c5ea66 commit cd6622e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: errors.go

+6
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ type Logger interface {
4444
Print(v ...interface{})
4545
}
4646

47+
// NopLogger is a nop implementation of the Logger interface.
48+
type NopLogger struct{}
49+
50+
// Print implements Logger interface.
51+
func (nl *NopLogger) Print(_ ...interface{}) {}
52+
4753
// SetLogger is used to set the default logger for critical errors.
4854
// The initial logger is os.Stderr.
4955
func SetLogger(logger Logger) error {

0 commit comments

Comments
 (0)