I'm a beginning go user trying to install the go apache arrow module, so I can run the introductory examples in the user guide. When I try to install the library, I receive the following errors:
$ go install github.com/apache/arrow/go@latest
go: github.com/apache/arrow/go@latest:
module github.com/apache/arrow@latest found (v0.0.0-20220326002331-5bd4d8ec279d),
but does not contain package github.com/apache/arrow/go
$ go install github.com/apache/arrow/[email protected]
go: github.com/apache/arrow/[email protected]: github.com/apache/arrow/[email protected]:
invalid version: go/go.mod has post-v7 module path
"github.com/apache/arrow/go/v7" at revision go/v7.0.0
I've been able to install other go packages successfully, so I don't understand why this install is erroring out.
What is the correct invocation of "go install" to install apache arrow?
CodePudding user response:
There is an easy way: assume you have done go mod init
in your local project, you can start to write a file and import github.com/apache/arrow/go/v8
Like this example:
https://github.com/apache/arrow/blob/master/go/arrow/_examples/helloworld/main.go
Now you can easily do
go mod tidy && go mod vendor
And the tool should recognize the imports to download and vendorize.
Or you can do explicitly in your project dir,
go get -u github.com/apache/arrow/go/v8
then run the mod tidy and mod vendor