719016
719016

Reputation: 10431

installing go packages in linux

I am new at GO and just installed the latest version available for Linux AMD64, but although I can run go commands, I don't seem to be able to get, build or install any commands.

go get bufio
package bufio: unrecognized import path "bufio"

Any ideas?

Upvotes: 3

Views: 6137

Answers (2)

user350780
user350780

Reputation:

Did you set both the GOROOT and GOBIN environmental variables as described in the installation instructions?

BTW, did you install it from source or the release tarball?

Upvotes: 3

zzzz
zzzz

Reputation: 91193

Package "bufio" is part of the standard library. You cannot "go get" it. But no worry, any standard and supported installation procedure makes this package installed (as is the whole stdlib), so there's no need to "go get" it.

Just include

import "bufio"

in a package where you want to use its exported decalarations and it should "just work" ;-)

Upvotes: 11

Related Questions