Why group and order imports in Go?

Posted on 09 March 2022 - 1 min read

Why should I group and order imports in Go? [Read more]

Tagged with: go, conventions, import, best-practices, golang

Pre-commit hooks with Go

Posted on 29 August 2021 - 1 min read

Git hook scripts are becoming more and more popular. We run our hooks on every commit to automatically point out some simple issues in code before submission to code review. By pointing out these issues in this early phase, it allows a faster feedback loop than waiting for CI. [Read more]

Tagged with: go, golang, pre-commit, hooks, git, git-hook

Dependency injection with Go

Posted on 25 May 2021 - 3 min read

One of the advantages of using Go is that programmers can quickly onboard and start writing code. And I've seen a colleague who was able to read Go code in the first day and submit code change for review in the third day. Because the language is simple and straightforward, Go programmers can start writing production code without much knowledge about OOP or design patterns like dependency injection. In this post, we'll discuss the importance of dependency injection and how to apply it in Go effectively. [Read more]

Tagged with: go, golang, dependency-injection, dependency-inversion

Bong Nguyen © 2016 - 2022