Skip to content

Refactor main.go#51

Open
Xercoy wants to merge 1 commit intoBunchhieng:masterfrom
Xercoy:refactor-main
Open

Refactor main.go#51
Xercoy wants to merge 1 commit intoBunchhieng:masterfrom
Xercoy:refactor-main

Conversation

@Xercoy
Copy link

@Xercoy Xercoy commented Oct 21, 2018

As the project matures, main.go is getting a bit large to the point where there are non trivial parts of code which can be grouped together.

What I've done in this change is move the code for the different types of sources into their own file.

While this is the only change I've done, I also think that maybe there could be:

  • a separate file for all the type definitions that are in main.go
  • a separate file for all of the ancillary functions in main.go, ie everything besides the few constants and variables + the Init() and main() functions.

Just a thought. While these are stylistic changes in my opinion, I still think that main.go could benefit from improved organization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant