I’m following the book/pack1 example and getting the error:
package book/pack1 is not in GOROOT (C:\Program Files\Go\src\book\pack1)
when trying to run “go install book/pack1”.
go version go1.19 windows/amd64
These are details from go env:
set GOPATH=C:\Users\gangr\go
set GOROOT=C:\Program Files\Go
This is the path to pack1.go:
“C:\Users\gangr\go\src\book\pack1\pack1.go”
why wouldn’t the package search be done in GOPATH? and fail right away with GOROOT related error?