go mod download github.com/gin-gonic/gin@v1.9.(依赖路径)
依赖对其(使引用的都是所依赖的)
go mod tidy
编辑go.mod
go mod edit
go mod edit -require="github.com/gin-gonic/gin@v1.9.0"go mod edit -replace="golang.org/x/crypto@v8.0.0=github.com/golang/crypto@v1.2.3"go mod edit -exclude="github.com/gin-gonic/gin@v1.9.0"go mod edit -retract="v1.0.0"go mod edit -dropretract="v1.0.0"
将所有的依赖从go/pkg/mod备份到vendor中
go mod vendor
验证mod是否改变
go mod verify
找原因为什么引用某个依赖
go mod why github.com/go-playground/validator/v10
安装可执行文件(在go/bin中找到)
go install github.com/google/gops@Llatest()
go get github.com/gin-gonic/gin