1 go get -u && go mod tidy go get -u 会更新所有的包,tidy 会重新整理 go.mod 文件。 另外: 1 go get -u all 会更新所有包依赖包括测试依赖。