immersive-go-course icon indicating copy to clipboard operation
immersive-go-course copied to clipboard

My proposal to the output-and-error-handling project

Open jdra000 opened this issue 8 months ago • 1 comments

Learners, PR Template

This is my proposal to the output-and-error-handling-project. I spent most of the time coming up with the cleanest refactor I could think of. This is because my code implements a basic mocking for testing, so instead of writing to std output and std error, it writes to a buffer for testing purposes. I would like to know your opinion about my code and what could have I done better. I appreciate every suggestion. Amazing program by the way. Thanks for doing this.

Description

I split the possible server responses in three. A successful one, a delayed one, and the closed connection one. I knew I had a closed connection at the first try of the GET request. I knew I had a delayed connection if the StatusCode was 429. I knew I had a successfull one if the StatusCode was 200. For testing purposes I created an http test server for each case on different test files, so I could treat each test appropriately.

jdra000 avatar Mar 26 '25 23:03 jdra000

Deploy Preview for cyf-systems ready!

Name Link
Latest commit d57c81ed6a1f6f250a392afb841bae7cab66f46b
Latest deploy log https://app.netlify.com/sites/cyf-systems/deploys/67e80e08e0e2380008ed38e4
Deploy Preview https://deploy-preview-256--cyf-systems.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Mar 26 '25 23:03 netlify[bot]