Reading strings from io
R := io.Reader
buf := new(bytes.Buffer)
buf.ReadFrom(R)
stringValue := buf.String() // Convert to string
September 8, 2019 ~ 1 min read
Reading strings from io
R := io.Reader
buf := new(bytes.Buffer)
buf.ReadFrom(R)
stringValue := buf.String() // Convert to string
Hi, I'm Sebastian. I'm a software developer from Costa Rica. You can follow me on Twitter. I enjoy working on distributed systems.