上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 52 下一页
摘要: 参考资料: EPOLL-UDP-GOLANG TCP-三次握手-四次挥手 TCP-UDP基础 FLANNEL-Golang-UDP高性能开发资料 EPOLL基础原理-C10K问题 UDP基础原理 阅读全文
posted @ 2016-12-26 14:37 junneyang 阅读(2894) 评论(0) 推荐(0) 编辑
摘要: 参考资料: 阅读全文
posted @ 2016-12-24 09:29 junneyang 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 最佳实践 最佳实践 1 包管理 1 包管理 1.1 使用包管理对Golang项目进行管理,如:godep/vendor等工具 1.1 使用包管理对Golang项目进行管理,如:godep/vendor等工具 1.2 main/init函数使用,init函数参考python 1.2 main/init 阅读全文
posted @ 2016-12-23 18:56 junneyang 阅读(3946) 评论(0) 推荐(0) 编辑
摘要: 直接上代码: 简介 Go语言的并发原语允许开发者以类似于 Unix Pipe 的方式构建数据流水线 (data pipelines),数据流水线能够高效地利用 I/O和多核 CPU 的优势。 本文要讲的就是一些使用流水线的一些例子,流水线的错误处理也是本文的重点。 阅读建议 数据流水线充分利用了多核 阅读全文
posted @ 2016-12-23 18:23 junneyang 阅读(2595) 评论(0) 推荐(1) 编辑
摘要: 参考资料: http://studygolang.com/articles/7994--Defer函数调用参数的求值 golang的闭包和普通函数调用区别:http://studygolang.com/articles/356 结论: 闭包中参数是其地址 闭包中参数的确定是在声明时求值,而不是在调用 阅读全文
posted @ 2016-12-23 13:30 junneyang 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 结论: 闭包函数可以直接引用外层代码定义的变量, 但是,注意,闭包函数里面引用的是变量的地址, 当goroutine被调度时,改地址的值才会被传递给goroutine 函数。 介绍 go的闭包是一个很有用的东西。但是如果你不了解闭包是如何工作的,那么他也会给你带来一堆的bug。这里我会拿出Go In 阅读全文
posted @ 2016-12-23 13:21 junneyang 阅读(2115) 评论(0) 推荐(0) 编辑
摘要: 代码示例: go程序包源码解读——golang.org/x/net/context: http://m.blog.csdn.net/article/details?id=49100433 Go语言并发模型:像Unix Pipe那样使用channel: https://segmentfault.com 阅读全文
posted @ 2016-12-22 21:14 junneyang 阅读(1725) 评论(0) 推荐(0) 编辑
摘要: 服务端代码示例: 客户端代码示例: 参考资料: golang http请求优化: https://www.douban.com/note/285372115/ goreq: 极简单的流式golang http client: http://www.tuicool.com/articles/FNZbY 阅读全文
posted @ 2016-12-22 14:41 junneyang 阅读(51019) 评论(0) 推荐(0) 编辑
摘要: 参考资料: 阅读全文
posted @ 2016-12-22 09:40 junneyang 阅读(620) 评论(0) 推荐(0) 编辑
摘要: cannot define new methods on non-local type int 参考资料: http://wiki.jikexueyuan.com/project/the-way-to-go/10.6.html http://stackoverflow.com/questions/2 阅读全文
posted @ 2016-12-21 19:01 junneyang 阅读(1011) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 52 下一页