Skip to content

Commit 12030e4

Browse files
christiangdaclaude
andcommitted
docs: update documentation for v0.40.1 changes
- Update Whats-New.md with idpscimcli modernization section - Fix Configuration.md: replace invalid log_level "trace" with "debug" (slog only supports debug|info|warn|error) - Fix typos in idpscimcli.md: "is is" → "is", "goups" → "groups", "in local" → "locally" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c9e51a3 commit 12030e4

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

docs/Configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ __NOTES:__
3636
create a `.idpscim.yaml` file in the `$HOME/` directory or in the same path where the `idpscim` program is.
3737

3838
```yaml
39-
log_level: trace
39+
log_level: debug
4040
log_format: text
4141

4242
gws_service_account_file: /path/to/gws_service_account.json
@@ -81,7 +81,7 @@ or create a `<any filename on whenever place>.yaml` then run the `idpscim` progr
8181
--gws-groups-filter 'name:AWS* email:aws*' \
8282
--gws-groups-filter 'email:administrators*' \
8383
--sync-method 'groups'
84-
--log-level trace
84+
--log-level debug
8585
```
8686

8787
## Environment variables
@@ -96,7 +96,7 @@ export IDPSCIM_GWS_SERVICE_ACCOUNT_FILE="/path/to/gws_service_account.json"
9696
export IDPSCIM_GWS_USER_EMAIL="my.user@gws-email.com"
9797
export IDPSCIM_GWS_GROUPS_FILTER='name:AWS* email:aws*','email:administrators*'
9898
export IDPSCIM_SYNC_METHOD="groups"
99-
export IDPSCIM_LOG_LEVEL="trace"
99+
export IDPSCIM_LOG_LEVEL="debug"
100100
101101
# then execute the program
102102
./idpscim

docs/Whats-New.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,21 @@ Several code quality improvements and bug fixes in the AWS SCIM client:
3434

3535
Applied Go 1.26 best practices across the codebase:
3636

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`.
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`, `pkg/aws`, and `cmd/idpscim`.
3838
* **`errors.AsType[T]`:** Migrated `errors.As` calls to the generic `errors.AsType[T]` in `internal/core/sync.go` for type safety and performance.
3939
* **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).
4040

41+
### CLI Modernization (`idpscimcli`)
42+
43+
Improved the `idpscimcli` command-line tool for code quality and testability:
44+
45+
* **Fixed logger initialization bug:** Log handler options were applied after the handler was created, so log level and format from config had no effect. Fixed by configuring options before creating the handler.
46+
* **Testable error handling:** `getGWSDirectoryService` now returns errors instead of calling `os.Exit(1)`, allowing proper error propagation and unit testing.
47+
* **`show()` error handling:** The output function now returns errors instead of silently discarding marshal failures.
48+
* **Reduced code duplication:** Extracted `newSCIMHTTPClient()`, `newGWSHTTPClient()`, and `newAWSSCIMService()` helpers, eliminating 6 duplicated builder blocks.
49+
* **Added unit tests:** New tests for `show()` covering JSON, YAML, default format, marshal errors, and empty structs.
50+
* **Fixed typos:** "usrs" → "users", "Servive" → "Service" in command help text.
51+
4152
## v0.44.0
4253

4354
### Configurable User Fields

docs/idpscimcli.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# idpscimcli
22

3-
This is is a `command-line tool` to check and validate some functionalities implemented in idpscim.
3+
This is a `command-line tool` to check and validate some functionalities implemented in idpscim.
44

5-
The Idea of this tools is check the configuration you will implement in the [idpscim](idpscim.md) program, like the `filter` used for `Google Workspace Groups` and `Users` and the inventory of users and goups in both sides.
5+
The idea of this tool is to check the configuration you will implement in the [idpscim](idpscim.md) program, like the `filter` used for `Google Workspace Groups` and `Users` and the inventory of users and groups in both sides.
66

77
## idpscimcli --help
88

@@ -48,7 +48,7 @@ Use "idpscimcli [command] --help" for more information about a command.
4848

4949
## Building the project
5050

51-
To build the project in local, you will need to have installed and configured at least the following:
51+
To build the project locally, you will need to have installed and configured at least the following:
5252

5353
1. [git](https://git-scm.com/)
5454
2. [Go](https://go.dev/learn/)

0 commit comments

Comments
 (0)