Here is the directory tree:
+/project
+---/bin
+---/pkg
+---/src
+---/client_test
+---client_test.go
+---main.go
In main.go:
package main
import ("client_test")
func main() {
client_test.Send()
}
In client_test.go:
package client_test
func Send() {
}
Error:
src/main.go|8| imported and not used: "client_test"
src/main.go|32| undefined: client_test
I've read How to use custom packages in golang? and I think I've had the same solution like this guy, but I just don't know how to solve this problem. Please help.
go env:
GOARCH="amd64"
GOBIN="/usr/local/go/bin"
GOCHAR="6"
GOEXE=""
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread -fno-common"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/staff/projects/Minigame_Server" (that's exactly my working directory)
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CGO_ENABLED="1"