Where is the module cache in golang?

后端 未结 5 1154
我在风中等你
我在风中等你 2021-01-01 11:38

When I enable gomodules and build my go program then the required packages are downloaded.

But I cannot find them in $GOPATH/src/ or in $GOPATH/s

5条回答
  •  情书的邮戳
    2021-01-01 12:00

    To determine cache locations, you can use go env:

    go env|grep CACHE
    

    To clean the caches, use go clean -modcache or go clean -cache depending on the type of cache to be cleared.

提交回复
热议问题