We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题描述 2.2.1,77页 题目四,“答案为D ” 。这个是错的。应该为:“ 答案为C”
如何找到这个错误
您认为应该如何?
图片 如果有可能,尽量提供图片。
其他补充信息 我写了代码进行测试: package main
import ( "fmt" "time" )
func main() { RangeTimer() }
func RangeTimer() { t := time.NewTimer(time.Second)
for _ = range t.C { fmt.Println("hi") }
} 输出: hi fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan receive]: main.RangeTimer() /Users//go/src/gitee.com/wide288/test/for-range1/main.go:15 +0xcc main.main() /Users//go/src/gitee.com/wide288/test/for-range1/main.go:9 +0x25
The text was updated successfully, but these errors were encountered:
谢谢反馈,这个问题已经在RainbowMango/GoExpertProgramming#76 回答了。
那我准备关闭这个问题了哈。
Sorry, something went wrong.
RainbowMango
No branches or pull requests
问题描述
2.2.1,77页
题目四,“答案为D ” 。这个是错的。应该为:“ 答案为C”
如何找到这个错误
您认为应该如何?
图片
如果有可能,尽量提供图片。
其他补充信息
我写了代码进行测试:
package main
import (
"fmt"
"time"
)
func main() {
RangeTimer()
}
func RangeTimer() {
t := time.NewTimer(time.Second)
}
输出:
hi
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan receive]:
main.RangeTimer()
/Users//go/src/gitee.com/wide288/test/for-range1/main.go:15 +0xcc
main.main()
/Users//go/src/gitee.com/wide288/test/for-range1/main.go:9 +0x25
The text was updated successfully, but these errors were encountered: