From 7f90580059f97d1755ee428605e2204f35caaf8c Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Sun, 2 Jun 2024 11:44:09 +0200 Subject: [PATCH] refactor: drop slog shim Signed-off-by: Mark Sagi-Kazar --- go.mod | 1 - go.sum | 2 -- logger.go | 3 +-- util.go | 2 +- util_test.go | 2 +- viper.go | 2 +- 6 files changed, 4 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index bc43df2..ed77300 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,6 @@ require ( github.com/pelletier/go-toml/v2 v2.2.2 github.com/sagikazarmark/crypt v0.20.0 github.com/sagikazarmark/locafero v0.4.0 - github.com/sagikazarmark/slog-shim v0.1.0 github.com/spf13/afero v1.11.0 github.com/spf13/cast v1.6.0 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index b86b696..6c93eb4 100644 --- a/go.sum +++ b/go.sum @@ -248,8 +248,6 @@ github.com/sagikazarmark/crypt v0.20.0 h1:aMLNL5RDUyk+/Bmoql3iYbv6C75/H0qvs6CWHz github.com/sagikazarmark/crypt v0.20.0/go.mod h1:ojgvzJOpJkRhzSrycMyk8cgctQgyfZN/d2/dVh4U68c= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= -github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= -github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= diff --git a/logger.go b/logger.go index 8938053..2553c31 100644 --- a/logger.go +++ b/logger.go @@ -2,8 +2,7 @@ package viper import ( "context" - - slog "github.com/sagikazarmark/slog-shim" + "log/slog" ) // Logger is a unified interface for various logging use cases and practices, including: diff --git a/util.go b/util.go index 117c6ac..9a6a5a8 100644 --- a/util.go +++ b/util.go @@ -12,13 +12,13 @@ package viper import ( "fmt" + "log/slog" "os" "path/filepath" "runtime" "strings" "unicode" - slog "github.com/sagikazarmark/slog-shim" "github.com/spf13/cast" ) diff --git a/util_test.go b/util_test.go index 8d0bda8..3d7b30f 100644 --- a/util_test.go +++ b/util_test.go @@ -11,11 +11,11 @@ package viper import ( + "log/slog" "os" "path/filepath" "testing" - slog "github.com/sagikazarmark/slog-shim" "github.com/stretchr/testify/assert" ) diff --git a/viper.go b/viper.go index f16f295..05e90c3 100644 --- a/viper.go +++ b/viper.go @@ -25,6 +25,7 @@ import ( "errors" "fmt" "io" + "log/slog" "os" "path/filepath" "reflect" @@ -35,7 +36,6 @@ import ( "github.com/fsnotify/fsnotify" "github.com/go-viper/mapstructure/v2" - slog "github.com/sagikazarmark/slog-shim" "github.com/spf13/afero" "github.com/spf13/cast" "github.com/spf13/pflag"