Error: Non-standard import "gopkg.in/yaml.v2" in standard package
11,198
Go has 2 paths that must be defined in os environment, GoRoot and GoPath, GoRoot is installation path of Go, there are only "standard packages" in it. GoPath is working folder, there are 3rd party (non-standard) packages in it, your source code folder should be in GoPath and be recognized as non-standard package. like C:\gopath\src\yourproject
![JB Reefer](https://i.stack.imgur.com/vLn8m.jpg?s=256&g=1)
Author by
JB Reefer
Updated on June 22, 2022Comments
-
JB Reefer about 2 years
I'm trying to import go-yaml, from https://github.com/go-yaml/yaml, and I'm seeing an error that Google isn't helping with.
I ran
go get gopkg.in/yaml.v2
, but I am getting the error:start.go:6:5: non-standard import "gopkg.in/yaml.v2" in standard package "boxcar"
when I try to run my program. I'm not doing anything exotic in my import, either:package main; import ( "os" "net" "gopkg.in/yaml.v2" )
Any help would be appreciated!