Settings

Theme

Show HN: go-template – A Cookiecutter template for Go

github.com

3 points by notsatan 4 years ago · 1 comment

Reader

notsatanOP 4 years ago

Hey HN, this would be more of an early release (still planning on some tweaks before a release) -- would love to hear your thoughts on this!

For some back-story, this is more of a side-side-project (made this while working on another side-project).

When I switched to using Go for my projects (from Python), the lack of a template generator similar to python-package-template[1] was very annoying. I would copy the basic files (Makefile, Github actions, PR templates, etc) from the previous project only to realize I forgot to change some stuff, and now would need to rewrite git history.

By the third project, I decided to create a template generator for Go! I've tried to keep the generated project as flexible as possible - you can decide to skip the of it and go for a simple project, or take the bloat (pre-commit would need Python for one).

While making go-template, one of my side goals has been to keep the project beginner-friendly. I remember stumbling upon python-package-template[1] as a novice, and learning more than I had in a semester - Makefiles, linters, code-formatters, semantic versioning, pipelines, and so much more! With go-template, I hope to give that same experience to some other newbie who might stumble upon my repo (or a project generated using go-template).

As a fun fact, go-template has an option to remove Github-specific-features (pull request templates, workflows, etc). This was inspired by a comment on HN[2] pointing out that many open-source projects were on Github simply because of FOMO, which in-turn promoted Github's dominance!

[1]: https://github.com/TezRomacH/python-package-template

[2]: https://news.ycombinator.com/item?id=28796068

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection