
golang
文章平均质量分 60
a person~~
I am a person
展开
-
golang string join
To compare different join string way used memoryCodefunc randomString(n int) string { b := make([]byte, n) for i := range b { b[i] = letterBytes[rand.Intn(len(letterBytes))] } return string(b)}func concat(n int) string { var s strings.Bui..转载 2022-05-19 14:58:13 · 468 阅读 · 0 评论 -
Golang Bibble core notes
1. Execute defer inside the loopDescribe:Executing defer inside the loop will cause the resource to be relased late,because defer id executed after the method endsError Code:func error_code_defer() { for i := 0; i < 50; i++ { f, err := o原创 2022-05-17 11:33:29 · 110 阅读 · 0 评论