Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to import and use an external library into a go project

Tags:

aerospike

go

I'm newbie to go lang and i created an hello project with intellij.

now I want to use external lib. for example:

connect into aerospike using:

http://www.aerospike.com/docs/client/go/examples.html

what I don't understand is how to import it into solution. I've run from the terminal the command:

go get github.com/aerospike/aerospike-client-go

but I don't see any result in the project and don't understand which object to use from my main method.

can you help?

like image 845
user8215502 Avatar asked Jul 13 '17 13:07

user8215502


1 Answers

The go get command downloads the dependency to your $GOPATH dir from where it is accessible by the go compiler when building your sources. Now you simply have to import the package by its full name import github.com/aerospike/aerospike-client-go

like image 111
Nestor Sokil Avatar answered Sep 20 '22 10:09

Nestor Sokil