Where is the module cache in golang?

后端 未结 5 1121
我在风中等你
我在风中等你 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:04

    In case you want clean up cache there is a command go clean --modcache

    In case you just need to update some dependency you probably want to clean up information about this dependency from

    • go.mod
    • go.sum
    • vendor/modules.txt

提交回复
热议问题