如何使用 Go Get 从 GitHub 安装软件包
要使用 go get 从 GitHub 安装软件包,请按照以下步骤操作:
go get <import_path>
示例
安装包 github.com/capotej/groupcache- db-experiment,您将运行以下命令命令:
go get github.com/capotej/groupcache-db-experiment
命令参考
go get 命令有各种标志,您可以使用它们来控制其行为:
附加说明
例如
这里是使用的示例go get 使用 -v 标志来显示详细输出:
$ go get -v github.com/capotej/groupcache-db-experiment/... github.com/capotej/groupcache-db-experiment (download) github.com/golang/groupcache (download) github.com/golang/protobuf (download) github.com/capotej/groupcache-db-experiment/api github.com/capotej/groupcache-db-experiment/client github.com/capotej/groupcache-db-experiment/slowdb github.com/golang/groupcache/consistenthash github.com/golang/protobuf/proto github.com/golang/groupcache/lru github.com/capotej/groupcache-db-experiment/dbserver github.com/capotej/groupcache-db-experiment/cli github.com/golang/groupcache/singleflight github.com/golang/groupcache/groupcachepb github.com/golang/groupcache github.com/capotej/groupcache-db-experiment/frontend $
以上是如何使用Go Get安装GitHub包?的详细内容。更多信息请关注PHP中文网其他相关文章!