0
Windows에 설치됨. GOPATH이 설정됩니다go 설치를 실행하면 오류가 발생 함
C:\go-workspace\src\github.com\llnw\login
login.go이 포함되어 있습니다 :
c:\go-workspace
나는이 디렉토리에있는 파일이라는 login.go이
package main
func main() {
fmt.Printf("login\n")
}
는 내가 빌드 다음 시도 :
go build github.com/llnw/login/login
그러나 이 오류는 다음과 같습니다.
can't load package: package github.com/llnw/login/login: cannot find package "github.com/llnw/login/login" in any of:
C:\Go\src\github.com\llnw\login\login (from $GOROOT)
C:\go-workspace\src\github.com\llnw\login\login (from $GOPATH)
무엇이 잘못 되었나요? go build -h
에서
패키지가'github.com/llnw/login'이고'github.com/llnw/login/login'이 아니라면'go build github.com/llnw/login'을 실행하십시오 –
감사합니다, Yandry. 당신은 질문에 대답했지만 체크 표시가 없으므로 당신이 대답했다고 말할 수는 없습니다. –