Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 823
719016 Avatar asked May 09 '26 21:05

719016


1 Answers

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" ;-)

like image 177
zzzz Avatar answered May 11 '26 14:05

zzzz