[Golang] – How to clean my local mod dev env?

Sometimes can be required clean the go cache and/or binaries for example in order to solve local issues and/or reproduce some behaviour which is faced when a user tries to start your solution for the first time. So, following my tip.

$ export GO111MODULE=off
$ go clean --modcache
$ go clean

NOTE: The GO111MODULE=off is used to avoid issues as “can’t load package: package”

For a further understand and options see the Go documentation here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s