GOLANG
Everything you need to know about Packages in Go
A complete overview of package management and deployment in Go programming language
Migrate to Go Modules
Go provides a new feature called Modules which provides flexibility to manage your project and dependencies with ease. If you are working on Go packages, then you should consider relocating your project to Go Modules.
If you are familiar to languages like Java or JavaScript on Node, then you might be quite familiar with packages. A package is nothing but a directory with some code files, which exposes different variables (features) from a single point of reference. Let me explain, what that means.
Imagine you have more than a thousand functions that you need constantly while working on any project. Some of these functions have common behavior. For example, toUpperCase
and toLowerCase
function transforms case of a string
, so you write them in a single file (probably case.go). There are other functions which do some…