摘要: mac使用dtruss总结 阅读全文
posted @ 2018-04-13 16:11 jay- 阅读(174) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/kjfcpua/article/details/18265441 unc main() { nat := make(chan int) squ := make(chan int) go func() { for x := 0; x < 100; x++ { 阅读全文
posted @ 2018-03-20 10:23 jay- 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 参考:http://wiki.jikexueyuan.com/project/nsq-guide/ 参考:https://www.cnblogs.com/swarmbees/p/6635467.html 讲解nsq通俗易懂 http://www.baiyuxiong.com/?p=873 这个讲解比 阅读全文
posted @ 2018-03-16 16:35 jay- 阅读(255) 评论(2) 推荐(0) 编辑
摘要: 参考:https://studygolang.com/articles/4108 defer可以单独处理err panic与recover和defer一起使用 package main import "fmt" func main() { defer func() { // 必须要先声明defer, 阅读全文
posted @ 2018-03-14 15:19 jay- 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 1.将字符串的url,解析成struct类型 url.Parse() 参考:https://studygolang.com/articles/2876 url.QueryEscape() 生成浏览能识别的url查询参数 阅读全文
posted @ 2018-03-12 09:33 jay- 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 参考:https://studygolang.com/articles/6112 参考: https://studygolang.com/articles/1914 阅读全文
posted @ 2018-03-12 09:24 jay- 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 1.设计软件时,升级软件时第一位考虑的 阅读全文
posted @ 2018-03-07 10:10 jay- 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 1.go.uuid转换成string uuid.NewV4().tostrig() 2.string 装换成 [] byte var str string = "test" var data []byte = []byte(str) 3.[]byte 转成 string var data [10]b 阅读全文
posted @ 2018-01-29 10:14 jay- 阅读(1235) 评论(0) 推荐(0) 编辑
摘要: 1.如果map的一个属性是strct,要修改这个strct的属性值得方法: type S struct { name string} func main() { m := map[string]*S{"x": &S{"one"}} m["x"].name = "two" fmt.Println(m[ 阅读全文
posted @ 2018-01-11 14:19 jay- 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 1.goruntine 机制 参考地址:http://blog.csdn.net/liangzhiyang/article/details/52669851 2.匿名函数,内联函数:https://studygolang.com/articles/7277 阅读全文
posted @ 2018-01-10 17:21 jay- 阅读(75) 评论(0) 推荐(0) 编辑