DEV Community 👩‍💻👨‍💻

DEV Community 👩‍💻👨‍💻 is a community of 970,177 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Rudy Chung
Rudy Chung

Posted on • Updated on

OSD600 Lab 4

The Repo I worked On

This week I worked with devils2ndself again, this time on his SSG project which was created using Go. This was my first time working with source code written in Go, but it was relatively simple with my prior knowledge of C++. I forked and created a new branch to make my changes to. Then, when I completed my changes I created a pull request (#13) and asked the owner to review my code and shortly after my changed were merged (de7d8773).

What I Added

I added a feature which allows the application to accept a .json configuration file that contains options that were previously only provided through command-line arguments. I had to do a bit of Googling to figure out how to work with .json files in Go, but it turned out to be quite straightforward using some of Go's built-in standard library methods. I also had to change the help text and the command-line argument parsing to accommodate for a new option.

Difficulties I encountered

My IDE would automatically correct formatting issues upon saving a file, but since I was working with another person's repo I wanted to make as few changes as possible. How I got around it was by only staging the changes necessary to implement the feature I was adding. This way, I could maintain the formatting that was in the original source code. However, I accidentally discarded some of the changes that I made in this process. I had to manually make those lost changes again, which was inconvenient for me. In the future, I will be more careful when I am staging and discarding changes.

Top comments (0)

🌚 Friends don't let friends browse without dark mode.

Just kidding, it's a personal preference. But you can change your theme, font, etc. in your settings.

The more you know. 🌈