Skip to content

Commit d992594

Browse files
authored
Change NewZapLogger return type to *ZapLogger
Fix return type to prevent unintended type assertion Signed-off-by: Austin Lee <haulrest@gmail.com>
1 parent f80c92d commit d992594

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

logger/logger_zap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type ZapLogger struct {
1111
}
1212

1313
// NewZapLogger creates a new ZapLogger for web server use
14-
func NewZapLogger() (Logger, error) {
14+
func NewZapLogger() (*ZapLogger, error) {
1515
config := zap.NewProductionConfig()
1616
config.EncoderConfig.TimeKey = "timestamp"
1717
config.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder

0 commit comments

Comments
 (0)