2 回答
TA贡献1789条经验 获得超8个赞
但它已经在发生了。
由于它没有正确订购,我认为它会误导你认为它只打印 ~9xx 日志。
我运行它并得到(未显示完整输出):
2020/06/03 10:38:35 done for item 986
2020/06/03 10:38:35 done for item 988
2020/06/03 10:38:35 done for item 1000
2020/06/03 10:38:35 done for item 995
2020/06/03 10:38:35 done for item 993
2020/06/03 10:38:35 done for item 996
2020/06/03 10:38:35 done for item 997
2020/06/03 10:38:35 done for item 991
2020/06/03 10:38:35 done for item 998
2020/06/03 10:38:35 done for item 990
2020/06/03 10:38:35 done for item 992
2020/06/03 10:38:35 done for item 999
2020/06/03 10:38:35 done for item 989
2020/06/03 10:38:35 done for item 412
注意:有 1000 个。
如果要确认:
go run main.go &> sample.txt // Redirects the output of the executable to sample.txt
cat sample.txt | wc -l // Counts the number of lines in output
是1000。
- 2 回答
- 0 关注
- 112 浏览
添加回答
举报