Skip to content

Commit 44918ef

Browse files
christiangdaclaude
andcommitted
refactor: remove last pkg/errors usage from cmd/idpscim
Replace errors.Wrap with fmt.Errorf(%w) in cmd/idpscim/cmd/root.go, completing the removal of github.com/pkg/errors from the entire codebase and go.mod. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9ef15c5 commit 44918ef

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

cmd/idpscim/cmd/root.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"time"
1010

1111
"github.com/aws/aws-lambda-go/lambda"
12-
"github.com/pkg/errors"
1312
"github.com/slashdevops/idp-scim-sync/internal/config"
1413
"github.com/slashdevops/idp-scim-sync/internal/setup"
1514
"github.com/slashdevops/idp-scim-sync/internal/version"
@@ -92,13 +91,13 @@ func run(ctx context.Context) error {
9291

9392
ss, err := setup.SyncService(ctx, &cfg)
9493
if err != nil {
95-
return errors.Wrap(err, "cannot create sync service")
94+
return fmt.Errorf("cannot create sync service: %w", err)
9695
}
9796

9897
slog.Debug("app config", "config", cfg)
9998

10099
if err := ss.SyncGroupsAndTheirMembers(ctx); err != nil {
101-
return errors.Wrap(err, "cannot sync groups and their members")
100+
return fmt.Errorf("cannot sync groups and their members: %w", err)
102101
}
103102

104103
slog.Info("sync groups completed", "duration", time.Since(timeStart).String())

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ require (
1010
github.com/aws/aws-sdk-go-v2/service/s3 v1.98.0
1111
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.41.5
1212
github.com/google/go-cmp v0.7.0
13-
github.com/pkg/errors v0.9.1
1413
github.com/slashdevops/httpx v0.0.4
1514
github.com/spf13/cobra v1.10.2
1615
github.com/spf13/viper v1.21.0

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
8484
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
8585
github.com/pelletier/go-toml/v2 v2.3.0 h1:k59bC/lIZREW0/iVaQR8nDHxVq8OVlIzYCOJf421CaM=
8686
github.com/pelletier/go-toml/v2 v2.3.0/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
87-
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
88-
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
8987
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
9088
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
9189
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=

0 commit comments

Comments
 (0)