var DebugGoroutines … type goroutineLock … func newGoroutineLock() goroutineLock { … } func (g goroutineLock) check() { … } func (g goroutineLock) checkNotOn() { … } var goroutineSpace … func curGoroutineID() uint64 { … } var littleBuf … // parseUintBytes is like strconv.ParseUint, but using a []byte. func parseUintBytes(s []byte, base int, bitSize int) (n uint64, err error) { … } // Return the first number n such that n*base >= 1<<64. func cutoff64(base int) uint64 { … }