Google Go Win: 无法找到导入 “http”

huangapple go评论80阅读模式
英文:

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

huangapple
  • 本文由 发表于 2012年3月15日 17:11:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/9716750.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定