Ask HN: Modern Go Dev Setup

📰 Hacker News · denyial

Learn a modern Go development setup for a local Nvim/CLI flow, similar to Python's pyenv, poetry, and tox setup

intermediate Published 16 Oct 2022
Action Steps
  1. Install Go using a version manager like goreleaser or goenv to manage different Go versions
  2. Set up a Go project structure with a go.mod file, a src directory, and a tests directory
  3. Use a dependency manager like Go Modules or Glide to manage dependencies
  4. Configure a linter like golint or golangci-lint to enforce coding standards
  5. Use a testing framework like Go's built-in testing package or Ginkgo to write and run tests
Who Needs to Know This

Go developers and teams can benefit from a standardized development setup, ensuring consistency and efficiency in their workflow

Key Insight

💡 A well-structured Go development setup is crucial for productivity and collaboration

Share This
💻 Learn a modern #Go dev setup for a local #Nvim/#CLI flow! 🚀

Key Takeaways

Learn a modern Go development setup for a local Nvim/CLI flow, similar to Python's pyenv, poetry, and tox setup

Full Article

For anyone who would consider themselves familiar with Go, what's your dev setup? I'm coming from Python 6yoe, am looking to learn Go. What is the 'recommended/idiomatic' professional Go dev setup for a local Nvim/CLI flow? In Python, it would be something like `pyenv` version control, `poetry` environment, maybe `tox` for automation, `flake8`/`black` etc. Dump all their config in a root `pyproject.toml`, dir structure with `tests`, `src` and modules available and imported from root path. Write code -> run `python X.py` etc. Basically what I want to know is what is the equivalent 'pretty good' setup for Go? Beyond setting PATH and GOPATH with some helloworld example go.mod it's not apparent from docs/tutorials what the equivalent environments/directories/commands are to the Python example above. Any advice or opinions welcome! Learning syntax is fine, but without working in a few teams first to get a feeling of dev flo
Read full article → ← Back to Reads