[Golang] How to import a package on the specific version

In Golang, when a package is imported, by default the codebase of the package’s default branch will be used by the caller project. However, sometimes we want to import a package’s specific branch codebase. For example, the specific version fixed a bug where we can’t wait until the repository maintainer merges the pull request. So in this post, I will walk you through how to specify a package version in your Golang project. Let me take an example to help explain better. ...

DigitalOcean Referral Badge
Sign up to get $200, 60-day account credit !