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.
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:
type
definitions that are in main.gomain.go
, ie everything besides the few constants and variables + theInit()
andmain()
functions.Just a thought. While these are stylistic changes in my opinion, I still think that
main.go
could benefit from improved organization.