英文: Golang dynamic sizing slice when reading a file using buffo.read 问题 我有一个问题,我需要使用bufio.read逐行读取一个...
base64解码器(io.Reader实现)的异常行为
英文: base64 decoder (io.Reader implementation) misbehaviour 问题 我尝试在一个for循环中重新声明/赋值一个base64解码器,并在循环结束前...
无法将 (type []byte) 用作类型 io.Reader。
英文: Cannot use (type []byte) as type io.Reader 问题 我不理解这个错误,这是我在机器"A"上执行的main.go代码: package...
Scanln在Golang中不接受空格。
英文: Scanln in Golang doesn't accept whitespace 问题 你可以使用Scanln函数来接受包含空格的输入。 英文: How can I use Sca...
将exec.Command的输出复制到文件中,当缓冲区接收到数据时。
英文: Copy exec.Command output to file as the buffer receives data 问题 我有一个脚本,运行时会将大量文本输出到STDOUT。我想执行这个...
如何获取一个实现了io.WriteCloser接口的bufio.Writer对象?
英文: How to get a bufio.Writer that implements io.WriteCloser 问题 我想扩展现有的代码,以无缓冲的方式将数据写入文件。 该代码期望一个实现了...
稀疏文件在使用io.Copy()时非常庞大。
英文: Sparse files are huge with io.Copy() 问题 我想将文件从一个地方复制到另一个地方,问题是我处理了很多稀疏文件。 有没有(简单的)方法可以在目标位置复制稀疏文...
使用io.Copy从bufio.Reader复制到STDOUT时出现奇怪的字符。
英文: golang - weird characters using io.Copy to copy from bufio.Reader to STDOUT 问题 我有一个应用程序,它通过使用doc...
Golang的bytes.Buffer对于一个写入者/一个读取者的线程安全性。
英文: Golang's bytes.Buffer thread safety for one writer/one reader 问题 我知道golang的bytes.Buffer不是线程安...
写入 []byte 到文件中导致生成了一个大小为零的文件。
英文: Go. Writing []byte to file results in zero byte file 问题 我试图将结构化数据序列化到文件中。我查看了一些示例,并创建了以下结构: func...
19