How do I import a specific version of a package using go get?

Go 1.11 will have a feature called go modules and you can simply add a dependency with a version. Follow these steps:

go mod init .
go mod edit -require
go get -v -t ./...   
go build
go install 

Here’s more info on that topic –

Leave a Comment