September 2017
Intermediate to advanced
466 pages
9h 33m
English
There will be times when you are developing a big Go program that uses lots of nonstandard Go packages and you want to start the compilation process from the beginning. Go allows you to clean up the files of a package in order to recreate it later. The following command cleans up a package without affecting the code of the package:
$ go clean -x -i aSimplePackage cd /Users/mtsouk/go/src/aSimplePackage rm -f aSimplePackage.test aSimplePackage.test.exe rm -f /Users/mtsouk/go/pkg/darwin_amd64/aSimplePackage.a
Similarly, you can also clean up a package that you have downloaded from the internet, which also requires the use of its full path:
$ go clean -x -i github.com/go-sql-driver/mysql cd /Users/mtsouk/go/src/github.com/go-sql-driver/mysql ...
Read now
Unlock full access