Here is a reproduction: https://play.golang.org/p/_rVEZdfEXB Summary: if parsing [][]byte, it the slice is 185 elements, it works. If it is 186 elements, the output changes. WAT?
评论:
sethammons:
Help from a couple of smart guys at work, thanks Kevin and Vasko!: https://play.golang.org/p/p17ZApwz4A
From https://golang.org/pkg/bufio/#Scanner.Bytes: "The underlying array may point to data that will be overwritten by a subsequent call to Scan"
