Hi guys,
I normally use my Linux machine, running VS Code and the Go extension for all my Go projects. This works fine, however now i am using my work laptop which is unfortunately Windows based.
I have Windows 10 running on the laptop, along with VS Code and Go version 1.14.6. Not completely up to date, but no older than 6 months.
I have been completely unable to figure out how to download/install a particular library or package from github. Ordinarily this is a piece of cake on my Linux machine, however in Windows I can’t seem to get this to work.
When I run the code (which I know works, as I have seen it built and run on another machine) I get the following error:
main.go:6:2: cannot find package “github com/jedib0t/go-pretty/v6/table” in any of:
C:\Go\src\github.com\jedib0t\go-pretty\v6\table (from $GOROOT)
C:\Gowork\src\github.com\jedib0t\go-pretty\v6\table (from $GOPATH)
NOTE IGNORE THE MISSING DOT. Go forum refuses to let me put the dot between github and com in the error stated above!
If I try to run the following (or various derivatives of it) in the command line:
go get github.com/jedib0t/...
It doesn’t come up with an error, and in fact appears to complete, but I still have no library to compile against.
If I try what makes more sense to me:
go get github.com/jedib0t/go-pretty
I get told the following:
go build github.com/jedib0t/go-pretty: no non-test Go files in C:\Gowork\src\github.com\jedib0t\go-pretty
What am I doing wrong in Windows? Why can’t I do something that is so straighforward in Linux?
Thanks for the help!