Member-only story
5 Useful Golang Modules Developers Should Know in 2022
These Go modules will save you a lot of time
Go is an incredibly powerful and versatile language for multiple purposes. It’s reliable, fast, and easy to use.
Golang has fantastic documentation. Go also is very easy to scale. Today, we look into the best Go modules to make working with Go even easier. So here’s a list of ten useful Go modules!
Gen
Gen is a tool that actually generates code for you, how handy? It’s intended to offer generics-like functionality on your types.
Installing the module
Run the following command:
go get github.com/clipperhouse/gen
How to use it
To use this module you first create a new Go project and define a type:
// +gen slice:"Where,Count,GroupBy[string]"
type MyType struct {}
And at the command line, simply type:
gen
You should see a new file, named mytype_slice.go
.