diff --git a/go.mod b/go.mod index 2a11523..52f8009 100644 --- a/go.mod +++ b/go.mod @@ -2,10 +2,7 @@ module github.com/Evernorth/slogx-go go 1.23.1 -require ( - github.com/rotisserie/eris v0.5.4 - github.com/stretchr/testify v1.9.0 -) +require github.com/stretchr/testify v1.9.0 require ( github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/go.sum b/go.sum index db1d876..60ce688 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,6 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rotisserie/eris v0.5.4 h1:Il6IvLdAapsMhvuOahHWiBnl1G++Q0/L5UIkI5mARSk= -github.com/rotisserie/eris v0.5.4/go.mod h1:Z/kgYTJiJtocxCbFfvRmO+QejApzG6zpyky9G1A4g9s= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= diff --git a/slogx/level-manager.go b/slogx/level-manager.go index c5dcdea..4a917b1 100644 --- a/slogx/level-manager.go +++ b/slogx/level-manager.go @@ -1,7 +1,7 @@ package slogx import ( - "github.com/rotisserie/eris" + "errors" "log/slog" "sync" ) @@ -33,10 +33,10 @@ func GetLevelManager() LevelManager { // updated when UpdateLevels is called. func (lm *defaultLevelManager) ManageLevelFromEnv(levelVar *slog.LevelVar, key string) error { if levelVar == nil { - return eris.New("levelVar is required") + return errors.New("levelVar is required") } if key == "" { - return eris.New("envVar is required") + return errors.New("envVar is required") } lm.levelVarMap.Store(levelVar, key) return nil diff --git a/slogx/level-support.go b/slogx/level-support.go index 0d424a3..045d665 100644 --- a/slogx/level-support.go +++ b/slogx/level-support.go @@ -1,7 +1,7 @@ package slogx import ( - "github.com/rotisserie/eris" + "errors" "log/slog" "os" "strings" @@ -23,7 +23,7 @@ func GetLevelByName(levelName string) (*slog.Level, error) { levelError := slog.LevelError return &levelError, nil } else { - return nil, eris.New("invalid level name: " + levelName) + return nil, errors.New("invalid level name: " + levelName) } }