Hongcai Ren
Hongcai Ren
Just found this repo. @mohae are you still maintaining this? - add support for go module? - release a versioned tag?
The latest release is [v1.0.0](https://github.com/ghodss/yaml/releases/tag/v1.0.0) which is released in the year 2017, I think it's time to cut a new release, e.g. `v1.0.1` or `v1.1.0`(only if there are new features)....
**问题描述** 描述panic实现原理时使用图表来解释效果可能更好 **如何找到这个错误** - 章节:8.3 - 页码:251 **您认为应该如何?** **图片** 如果有可能,尽量提供图片。 **其他补充信息**
在项目[cloudflare/golz4](https://github.com/cloudflare/golz4)中,作者曾提交过一个commit,我们称它为[commit B]( https://github.com/cloudflare/golz4/commit/27f83594ae3e85936dd5c444ddd615632abbbbfb),它是基于[commit A](https://github.com/cloudflare/golz4/commit/ef862a3cdc58a6f1fee4e3af3d44fbe279194cde)的。 不知出于何种原因,作者后面又把commit B给删除了,记录这里不是回滚,而是删除,猜测是force push到master分支。 当前master分支最近一个commit为 commit A. 造成的影响: - commit B已经被部分代理收录,但用户无法使用。
Kubernetes中也有recover的错误用法,两个案例需要补充到`附录-recover失效`章节中: 参考信息: - Kubernetes对panic应该recover和panic的思考:https://github.com/kubernetes/kubernetes/pull/91566 - recover错误用法-1:https://github.com/kubernetes/kubernetes/pull/91561 - recover错误用法-2:https://github.com/kubernetes/kubernetes/pull/91566
```go func ReadChanReturnValue() { ch := make(chan int, 10) ch
容器类型: - heap(src/container/heap) - list(src/container/list) - ring(src/container/ring) - set(非标准库)(https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/apimachinery/pkg/util/sets) 参考素材: - `heap` kubefed 实现的[delivererHeap](https://github.com/kubernetes-sigs/kubefed/blob/de2e0a9f0aa41971a79e6bd72cc184b4aa592231/pkg/controller/util/delaying_deliverer.go#L41) - `heap` kubernetes 实现的 [TimeValue](https://github.com/kubernetes/kubernetes/blob/b07d99dd35e9b74389dbdde59f3496755bb04d14/pkg/controller/nodelifecycle/scheduler/rate_limited_queue.go#L43)
``` [root@ecs-d8b6 ~]# go tool trace Usage of 'go tool trace': Given a trace file produced by 'go test': go test -trace=trace.out pkg Open a web browser displaying trace: go...
源码: ``` func RangeString() { s := "Hello World" for i, v := range s { fmt.Printf("index: %d, value: %c\n", i, v) } } ``` Example: ``` func ExampleRangeString() {...
Go的switch语句分为两种类型: - 表达式 - 类型 参考资料: [Switch statements](https://golang.org/ref/spec#Switch_statements).