Hello, everyone. I just started playing go today. My deployment is as follows:
export GOROOT=$HOME/source/go
export GOBIN=$GOROOT/bin
export GOARCH=amd64
export GOOS=linux
export GOPATH=$HOME/dewei/go
export PATH=.:$PATH:$GOBIN
then my work address is dewei/work_go, create main.go, create urls/url.go in directory, import prompt failed in main.go, under the reminder of a friend, I changed my work path to dewei/go/src, created a main.go, and created urls/url.go under src and still reported an error. The error cannot be found as follows:
main.go:7:2: cannot find package "linju/urls/url" in any of:
/home/tusimple/source/go/src/linju/urls/url (from $GOROOT)
/home/tusimple/dewei/go/src/linju/urls/url (from $GOPATH)
The main.go import method is as follows:
import "linju/urls/url" this linju is under / home/tusimple/dewei/go/src/.