Skip to content

Commit

Permalink
Merge pull request #4 from Evernorth/feature/remove-eris
Browse files Browse the repository at this point in the history
removing eris
  • Loading branch information
shelleeboo authored Oct 22, 2024
2 parents 0891d4f + 7ef6562 commit ce1487f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
6 changes: 3 additions & 3 deletions slogx/level-manager.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package slogx

import (
"github.com/rotisserie/eris"
"errors"
"log/slog"
"sync"
)
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions slogx/level-support.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package slogx

import (
"github.com/rotisserie/eris"
"errors"
"log/slog"
"os"
"strings"
Expand All @@ -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)
}
}

Expand Down

0 comments on commit ce1487f

Please sign in to comment.