我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

http.Get返回协议不可用错误[关闭]

When I try to run this example at http://golang.org/pkg/net/http/#example_Get, it returns the following error

2009/11/10 23:00:00 Get http://www.google.com/robots.txt: dial tcp: Protocol not available

Any idea why?

The Go Playground does not allow HTTP requests. This has nothing to do with code. It is a security precaution enforced by the playground.

近期文章

  • 您如何在Go中设置和清除一点?
  • Golang中的严格json解析器
  • 在Go中,未命名的参数是否有用?
  • 如何在Go中存储ECDSA私钥
  • 确定退出活动的goroutine程序吗?
  • 如何在Go中遍历UTF-8字符串?
  • 组合绝对路径和相对路径以获取新的绝对路径
  • 如何在Go中从http重写/重定向到https?
  • 在Golang中将数组插入Postgresql数据库
  • Golang中具有多个json表示的一个结构
  • Go语言中的观察者模式
  • 去切片-容量/长度?
  • Golang:使用Regex提取数据
  • 将go项目分解为子文件夹
  • 如何在golang中检查NaN
  • 如何在golang中获取结构的json字段名称?
  • golang:go install尝试使用/ usr / local代替GOPATH
  • 是x86上Go的增量运算符吗?
  • 给定字符串时,strconv.Atoi()抛出错误
  • 函数类型与单一方法接口

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华