[英]Using provided CLI for a Go library
I would like to extract files compressed using the "siva" file format. 我想提取使用“ siva”文件格式压缩的文件。 Their library is written in Go and can be obtained using 他们的库是用Go编写的,可以使用
go get -u gopkg.in/src-d/go-siva.v1/...
Apparently, they have also provided a command line interface. 显然,他们还提供了命令行界面。 Given some Go package obtained using go get
, how does one use the CLI? 给定使用go get
获得的一些Go软件包,如何使用CLI? What am I missing here? 我在这里想念什么?
Here is the Github repo: https://github.com/src-d/go-siva#cli . 这是Github仓库: https : //github.com/src-d/go-siva#cli 。
Thanks! 谢谢!
I figured it out. 我想到了。
For arbitrary Go source code, one can just do go build
in the directory. 对于任意的Go源代码,只需在目录中进行go build
。
For this case, there was a sub-directory called cmd
, and after running go build
there, one gets a siva
executable. 对于这种情况,有一个名为cmd
的子目录,在其中运行go build
之后,将获得一个siva
可执行文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.