Run formatter

This commit is contained in:
Elara 2023-01-29 21:32:14 -08:00
parent ea30505f4e
commit 88f5095c65
4 changed files with 17 additions and 9 deletions

View File

@ -8,8 +8,10 @@ import (
"go.arsenm.dev/logger" "go.arsenm.dev/logger"
) )
var _ logger.Logger = &LogrusLogger{} var (
var _ logger.LogBuilder = &LogrusLogBuilder{} _ logger.Logger = &LogrusLogger{}
_ logger.LogBuilder = &LogrusLogBuilder{}
)
type LogrusLogger struct { type LogrusLogger struct {
logger *logrus.Logger logger *logrus.Logger

View File

@ -9,8 +9,10 @@ import (
"go.uber.org/zap/zapcore" "go.uber.org/zap/zapcore"
) )
var _ logger.Logger = &ZapLogger{} var (
var _ logger.LogBuilder = &ZapLogBuilder{} _ logger.Logger = &ZapLogger{}
_ logger.LogBuilder = &ZapLogBuilder{}
)
type ZapLogger struct { type ZapLogger struct {
Logger *zap.Logger Logger *zap.Logger

View File

@ -8,8 +8,10 @@ import (
"go.arsenm.dev/logger" "go.arsenm.dev/logger"
) )
var _ logger.Logger = &ZerologLogger{} var (
var _ logger.LogBuilder = &ZerologLogBuilder{} _ logger.Logger = &ZerologLogger{}
_ logger.LogBuilder = &ZerologLogBuilder{}
)
type ZerologLogger struct { type ZerologLogger struct {
logger zerolog.Logger logger zerolog.Logger

View File

@ -12,9 +12,11 @@ import (
"go.arsenm.dev/logger" "go.arsenm.dev/logger"
) )
var buf = &bytes.Buffer{} var (
var jsonlog = logger.NewJSON(buf) buf = &bytes.Buffer{}
var prettylog = logger.NewPretty(buf) jsonlog = logger.NewJSON(buf)
prettylog = logger.NewPretty(buf)
)
func TestJSON(t *testing.T) { func TestJSON(t *testing.T) {
t.Run("empty", func(t *testing.T) { t.Run("empty", func(t *testing.T) {