My system variables are
$ echo $GOPATH $GOROOT
C:\go-work C:\Go\
A progect path:
C:\go-work\src\packtest
The project structure
packtest
util
util.go
main.go
When I run from Visual Studio Code - “Run On Go Playground” I get
Upload to the Go Playground failed.
prog.go:5:2: cannot find package “packtest/util” in any of:
/usr/local/go/src/packtest/util (from $GOROOT)
/go/src/packtest/util (from $GOPATH)
The progect is in the system path, but VSC looks for files in different folders. How to fix that?
p.s. If run that in VSC from command line (not in the playground) it works