Featured
- Get link
- X
- Other Apps
Week 3: Lab 2
Lab 2
This lab was all about practicing pull requests on other peoples repository's. To start I had to go through the list of URL programs made from the 0.1 release and find one I would like to add to.
I ended up selecting Andy Yang's goURL for the lab because I noticed he did not have support for the 3xx series of status codes. To start I forked over and cloned the project, ran and tested the output, and then moved on to figuring out the solution to the feature I wanted to add. I opened an issue to discuss the feature I wanted to implement and also suggested I could update the output to provide more status code information besides the program saying "is alive" or "is bad".
GO supports redirect URL's by default when using the net/http package so adding in some more switch cases to check the more common 3xx status codes was pretty easy. I made them output as yellow to differentiate them from the other types of URL outputs. I also added some of the more common status code responses and provided exactly what type of response they each where to the output. Originally only 200, 400, and 404 statuses where displayed.
Once this was done I updated the ReadMe file to update the features list to show the more common 3xx status codes are now displayed in yellow.
When I finished making my changes I created a pull request with a detailed message about what I changed and my thoughts. The PR was accepted with no recommendation for changes by the owner.
Here is the Issue I brought up originally.
Here's the code change:
And here's the output:
What's next?
Next week I have to begin work on my release 0.2 assignment. With Hacktoberfest starting this month everyone in my class has been asked to participate. Hacktoberfest is a month long celebration about open source software were participants have to complete 4 valid pull requests over the course of the month. Im actually looking forward for this assignment, it sounds interesting.
- Get link
- X
- Other Apps
Comments
Post a Comment