style: refactor Desktop client for readability and maintainability by Saracomethstein · Pull Request #12723 · docker/compose (original) (raw)
What I did
Refactored the Desktop client to improve readability, maintainability, and error handling.
Key changes include:
- Simplified HTTP request logic
- Consolidated error handling with newHTTPStatusCodeError
- Ensured consistent use of defer resp.Body.Close() to prevent resource leaks
- Removed redundant code and improved structure
- Renamed unclear variables for better clarity
Related issue
- N/A
(not mandatory) A picture of a cute animal, if possible in relation to what you did