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"
)
var _ logger.Logger = &LogrusLogger{}
var _ logger.LogBuilder = &LogrusLogBuilder{}
var (
_ logger.Logger = &LogrusLogger{}
_ logger.LogBuilder = &LogrusLogBuilder{}
)
type LogrusLogger struct {
logger *logrus.Logger

View File

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

View File

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

View File

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