command
Version:
v0.0.0-...-b5285df
Opens a new window with list of versions in this module.
Published: Nov 10, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
reader.ReadLine 会使用 bufio.Reader.buf 字段,因此在调用多一次 ReadLine 后,前面的 a 变量会被后面的 b 变量覆盖
可参看 bufio.Reader 里面 ReadLine 和 ReadSlice 方法的实现
https://golang.org/src/bufio/bufio.go?s=9426:9493#L366
https://golang.org/src/bufio/bufio.go?s=9426:9493#L313
reader.ReadBytes 会 make 一个新的数组
Source Files
¶
Click to show internal directories.
Click to hide internal directories.