Skip to content

Fix assorted bugs, descriptions, and output issues#69

Merged
telegrapher merged 1 commit into
refactor/pretty-json-packagefrom
fix/assorted-fixes-batch
Feb 27, 2026
Merged

Fix assorted bugs, descriptions, and output issues#69
telegrapher merged 1 commit into
refactor/pretty-json-packagefrom
fix/assorted-fixes-batch

Conversation

@telegrapher

Copy link
Copy Markdown
Collaborator

Summary

  • Decode output is now valid JSON (cmd/decode.go). Previously printed header and payload as two separate JSON objects. Now outputs a single {"header":...,"payload":...} object.

  • Fix stdout corruption (ims/profile.go:120). fmt.Printf wrote error to stdout, corrupting JSON output for piped commands. Changed to log.Printf which writes to stderr.

  • Fix wrong flow description (cmd/authz/service.go:24). Said "Client Credential Authorization Flow" but the code exchanges an authorization code. Fixed to "Authorization Code Exchange". Also removed mismatched trailing quote.

  • Add trailing newline in refresh fullOutput (cmd/refresh.go:44). fmt.Printf("%s", jsonData) had no newline, causing the shell prompt to appear on the same line.

  • Fix grammar (cmd/profile.go:25). "an user" → "a user".

  • Declare mutual exclusion (cmd/exchange.go:50). --organization and --userID are now declared via cmd.MarkFlagsMutuallyExclusive() for better help output and CLI-level validation.

  • Fix doc comment (ims/admin_profile.go:45). Said "access token" but the function uses a service token.

  • Fix typo (ims/decode.go:36). "decodification" → "decoding".

Note: Stacked on #68 (refactor/pretty-json-package). Once #68 merges, GitHub retargets this PR to main.

- Make decode output a single parseable JSON object with header/payload
- Fix fmt.Printf writing error to stdout instead of stderr (log.Printf)
- Fix wrong flow description in authz service command
- Add trailing newline in refresh fullOutput mode
- Fix grammar "an user" to "a user" in profile command
- Declare --organization/--userID mutual exclusion via cobra
- Fix doc comment "access token" to "service token" in admin profile
- Fix "decodification" to "decoding" in decode error message
@telegrapher
telegrapher merged commit 0d36b06 into refactor/pretty-json-package Feb 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants