英文:
Google Go Win: can't find import "http"
问题
我下载了适用于Windows的Go(go.weekly.2012-01-27.windows-amd64.tar.gz),设置了环境变量
GOOS=windows
GOROOT=c:\go
GOBIN=c:\go\bin
GOARCH=386
然后我成功创建了一个HelloWorld.exe。现在我尝试了一个非常简单的例子,导入了“http”,但是它找不到它。我需要使用goinstall或者将一些东西添加到PATH吗?
英文:
I downloaded Go for Windows (go.weekly.2012-01-27.windows-amd64.tar.gz), set the environment variables
GOOS=windows
GOROOT=c:\go
GOBIN=c:\go\bin
GOARCH=386
and was able to create a HelloWorld.exe. Now I've tried a very simple example that imports "http", but it doesn't find it. Do I need goinstall or add sth. to the PATH?
答案1
得分: 29
import "net/http" // 在 r60 中是 "http",如果我没记错的话
英文:
import "net/http" // was "http" in r60 IIRC
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论