输出错误
Closed this issue · 1 comments
BugKillerPro commented
blog:https://darjun.github.io/2020/10/11/godailylib/rxgo/
博客里讲到:
func main() {
observable := rxgo.Just(1, 2, 3, 4, 5)()
<-observable.ForEach(func(v interface{}) {
fmt.Println("received:", v)
}, func(err error) {
fmt.Println("error:", err)
}, func() {
fmt.Println("completed")
})
}
输出是:
$ go run main.go
received: 1
received: 2
received: 3
received: 4
received: 5
completed
实测应该是:
$ go run main.go
1
2
error: unknown
3
4
5
darjun commented