GO-读取网页内容(获取外网IP地址)
2015-07-25 17:09
417 查看
func main() { resp, _ := http.Get("http://www.baidu.com") defer resp.Body.Close() io.Copy(os.Stdout, resp.Body) addr, _ := net.InterfaceAddrs() fmt.Printf("内网:%s", addr) }
相关文章推荐
- Django user使用
- go-并发与并行
- Mongo
- google play store终于能正常使用了
- Code Forces 559 A. Gerald's Hexagon(水~)
- OC学习笔记——类别(Category)
- Django 1.8安装使用
- django 1.8 官方文档翻译: 2-6-3 提供初始数据
- 原 django获取url参数总结
- 百度站长平台:官网LOGO部分站点禁用
- Goldengate常见错误处理方式
- Goldengate性能优化
- Google最新截屏案例详解
- HDU 2111 Saving HDU (贪心)
- Django Rest Framework
- Got to spend the money somehow.
- 开发Google Material Design风格的WPF程序
- CodeForces#313 C. Gerald's Hexagon
- Django笔记 —— 模板高级进阶
- COdeforces 555 A. Case of Matryoshkas