首先在 go 包网站找到要用的包,一般在谷歌搜索包名即可。

    然后在目的包页面的左上角有路径image.png
    复制路径到代码中加上导入包语句例如: import "golang.org/x/sync/errgroup"

    之后使用 go mod tidy 即可