Usage:
go clean [clean flags] [build flags] [packages]
删除某一个package的cache,一般来说我们不需要做这个是,go编译会自动分析依赖。但是当某一个依赖彼岸花了很多次的时候,我们可以用这个来清理依赖,eg:
go clean -modcache -r google.golang.org/grpc
flags
The -i flag causes clean to remove the corresponding installed archive or binary (what 'go install' would create).
The -n flag causes clean to print the remove commands it would execute, but not run them.
The -r flag causes clean to be applied recursively to all the dependencies of the packages named by the import paths.
The -x flag causes clean to print remove commands as it executes them.
The -cache flag causes clean to remove the entire go build cache.
The -testcache flag causes clean to expire all test results in the go build cache.
The -modcache flag causes clean to remove the entire module download cache, including unpacked source code of versioned dependencies.