You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: apply Go 1.26 best practices across codebase
- Remove github.com/pkg/errors dependency entirely from Go source.
Replace errors.Wrap with fmt.Errorf(%w) in internal/setup and
errors.Errorf with errors.New in internal/repository.
- Migrate errors.As to errors.AsType[T] (Go 1.26) in
internal/core/sync.go for compile-time type safety.
- Fix internal/model.Hash() calling os.Exit(1) on nil input or
encoding failure. Use panic instead (programming error, recoverable,
produces stack trace).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/Whats-New.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,14 @@ Several code quality improvements and bug fixes in the AWS SCIM client:
30
30
***Removed redundant context set:**`do()` no longer calls `req.WithContext(ctx)` since the request is already created with `http.NewRequestWithContext`.
31
31
***Simplified type conversions:**`CreateOrGetUser` and `CreateOrGetGroup` use type conversions instead of manual field-by-field struct copies.
32
32
33
+
### Go 1.26 Modernization
34
+
35
+
Applied Go 1.26 best practices across the codebase:
36
+
37
+
***Removed `github.com/pkg/errors` dependency:** Replaced all `errors.Wrap` and `errors.Errorf` with stdlib `fmt.Errorf` (with `%w`) and `errors.New` in `internal/setup`, `internal/repository`, and `pkg/aws`.
38
+
***`errors.AsType[T]`:** Migrated `errors.As` calls to the generic `errors.AsType[T]` in `internal/core/sync.go` for type safety and performance.
39
+
***Fixed `os.Exit` in `Hash()`:**`internal/model.Hash()` no longer calls `os.Exit(1)` on nil input or encoding failure. It panics instead (appropriate for programming errors, recoverable, produces stack trace).
0 commit comments