2021年1月26日

mac for docker访问宿主机服务

摘要: 转载链接 https://blog.csdn.net/weixin_33860528/article/details/91461648 阅读全文

posted @ 2021-01-26 11:00 biwentao 阅读(396) 评论(0) 推荐(0)

2021年1月8日

Go 指针逃逸分析

摘要: 引用 https://my.oschina.net/renhc/blog/2222104 阅读全文

posted @ 2021-01-08 13:42 biwentao 阅读(212) 评论(0) 推荐(0)

go 通过指针修改结构体小写字段的值

摘要: package main import ( "fmt" "unsafe" ) type W struct { b int32 c int64 } func main() { var w = W{} //这时w的变量打印出来都是默认值0,0 fmt.Println(w.b,w.c) //现在我们通过指 阅读全文

posted @ 2021-01-08 09:42 biwentao 阅读(369) 评论(0) 推荐(0)

2021年1月6日

go append的坑

摘要: b := []int{1,2,3,4,5} slice := b[:2] newSlice := append(slice, 50) fmt.Println(b) fmt.Println(newSlice) 打印: [1 2 50 4 5] [1 2 50] append 底层源码实现如果发现切片指 阅读全文

posted @ 2021-01-06 17:56 biwentao 阅读(168) 评论(0) 推荐(0)

2021年1月5日

go 基数排序

摘要: package main import ( "fmt" ) func SelectSortMax(arr []int) int { arrLen := len(arr) if arrLen <= 1 { return arr[0] }else { max := arr[0] for i, _ := 阅读全文

posted @ 2021-01-05 23:02 biwentao 阅读(133) 评论(0) 推荐(0)

2020年12月30日

es 排序突然很慢的原因

摘要: 今天突然之间发现一个访问es的查询很慢。由刚上线之前测试的100ms直接到了5s左右。瞬间懵逼。 这个用户索引大概200w的数据。 查询语句如下 GET /user/_search{"from":0,"query":{ "bool":{"must_not":[{"term":{"_id":"5faf 阅读全文

posted @ 2020-12-30 17:59 biwentao 阅读(2217) 评论(0) 推荐(0)

2020年12月10日

go goroutine pool设计

摘要: 推荐一遍由浅入深简绍goroutine pool设计的方案。https://strikefreedom.top/high-performance-implementation-of-goroutine-pool 阅读全文

posted @ 2020-12-10 16:34 biwentao 阅读(88) 评论(0) 推荐(0)

2020年6月28日

DevOps+Go

摘要: 转载 https://blog.csdn.net/qq_20867981/article/details/88846687 阅读全文

posted @ 2020-06-28 20:16 biwentao 阅读(127) 评论(0) 推荐(0)

group_concat 和 case when 的坑

摘要: SELECT size,instrument_id, (CASE side WHEN "sell" THEN group_concat(id ORDER BY id) END )as sell_ids, (CASE side WHEN "buy" THEN group_concat(id ORDER 阅读全文

posted @ 2020-06-28 16:13 biwentao 阅读(1400) 评论(0) 推荐(0)

2020年6月26日

go encoding/json 替代者

摘要: https://github.com/json-iterator/go 可以替代官方包encoding/json 提升json编码和解码效率 阅读全文

posted @ 2020-06-26 18:21 biwentao 阅读(189) 评论(0) 推荐(0)

导航