go mod use

Beginner go package management filled pit

Start the terminal execute the following command

1、set GO111MODULE=on

2、set GOPROXY=https://goproxy.io

3. If the execution error, the package may be go.mod version of the problem, you can add go.mod file  replace github.com/ugorji/go v1.1.4 => github.com/ugorji/go/codec v0.0.0- 20190204201341-e444a5086c43 (to replace the sample)

 

Guess you like

Origin www.cnblogs.com/jindp/p/11128141.html