喵喵时光机
除了使用调试器,我没有想到任何其他方法。尝试钻研> main.main() ./main.go:20 (PC: 0x4b68dc) 15: func main() { 16: 17: c := make(chan int,10) 18: a:=1 19: c<-a=> 20: fmt.Println(<-c) 21: 22: 23: }(dlv) p cchan int { qcount: 1, dataqsiz: 10, buf: *[10]int [1,0,0,0,0,0,0,0,0,0], elemsize: 8, closed: 0, elemtype: *runtime._type {size: 8, ptrdata: 0, hash: 4149441018, tflag: tflagUncommon|tflagExtraStar|tflagNamed|tflagRegularMemory (15), align: 8, fieldAlign: 8, kind: 2, equal: runtime.memequal64, gcdata: *0, str: 847, ptrToThis: 26368}, sendx: 1, recvx: 0, recvq: waitq<int> { first: *sudog<int> nil, last: *sudog<int> nil,}, sendq: waitq<int> { first: *sudog<int> nil, last: *sudog<int> nil,}, lock: runtime.mutex { lockRankStruct: runtime.lockRankStruct {}, key: 0,},}(dlv)