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: enable context-aware operations and graceful shutdown throughout (#3)
- Refactor functions throughout the codebase to accept and propagate context.Context for improved cancellation support
- Add signal-based context initialization for graceful shutdown in main
- Move application logic into a run function that returns an exit code for easier control flow
- Use net.ListenConfig with context in place of net.Listen to support context-aware socket binding
- Update browser open, callback server, token exchange, token verification, and refresh operations to be context-aware
- Update all related unit tests to provide context explicitly and use ListenConfig for port binding
- Replace plain lock.release calls with error-ignoring variants to avoid unused return value errors
- Add error handling for JSON encoding failures in all HTTP test handlers
- Introduce a helper function for error condition OAuth device flow tests to reduce duplicate test code
- Minor test improvements including commenting, error messages, and use of constants over literals for tokens
Signed-off-by: appleboy <appleboy.tw@gmail.com>
0 commit comments