Re:Basic project template for golang, slightly opinionated
by shanemhansen on Monday December 19, 2016 @12:05AM
(#13209581)
I noticed they default to creating a main function that runs os.Exit(0). I recommend not doing that because it stops any potential deferred actions from running. It's not required for their simple main() func to run correctly, but I feel it's a good habit to get into.
Re:Basic project template for golang, slightly opinionated
by marcus_holmes on Monday December 19, 2016 @07:08AM
(#13210902)
really? Three (known) dependencies before I even start? Plus Python?
The wonderful thing I'm loving about Golang is that I can reduce dependencies. Put the ones I need in a vendor directory. Edit those files to remove their dependencies for edge cases I don't need in my project.
Re:Basic project template for golang, slightly opinionated
by VonGallifrey on Monday December 19, 2016 @07:09AM
(#13210906)
I think you missed the sarcasm. I interprete the comment that it was meant to highlight that someone would complain about not using cookiecutter in exactly the same way someone is complaining that the project is using cookiecutter.
Said in another way: You can never make something that everyone likes. Someone will complain.
Re:Basic project template for golang, slightly opinionated
by chank on Monday December 19, 2016 @10:36AM
(#13212014)
The main comment was in the context of using python, not using cookiecutter. Golang has a built in template engine. Why not build your golang command line tool to build golang project seeds in golang?
The wonderful thing I'm loving about Golang is that I can reduce dependencies. Put the ones I need in a vendor directory. Edit those files to remove their dependencies for edge cases I don't need in my project.
Less is more!
Said in another way: You can never make something that everyone likes. Someone will complain.