5

I just installed golang on my machine. It appears that the way to install third party libraries is via the "goinstall" command, however this did not appear to install as part of the OSX package installer.

Am I missing something here?

Carl

1

3 Answers 3

7

Downloading and installing packages and dependencies is normally done using go get

go get github.com/user/package

Or go install when compiling and installing third party packages:

go install github.com/user/tool
Sign up to request clarification or add additional context in comments.

Comments

2

You may reference the old tutorial or book. Read these.

goinstall is replaced by go install, I often use go get -u to get updated source.

Another tip is go get -d in your *.go source directory, then, it will get related packages automatically.

Comments

0

You use go get like:

go get http://github.com/test

This downloads the package to your GitHub folder into your workspace.

Go install

Installs an exe file inside your bin folder.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.