io - How to get a string from a Reader? -
in strings module, there function func newreader(s string) *reader create reader
string.
how can get/read string strings.reader
?
you can use ioutil.readall :
bytes, err := ioutil.readall(r) // err management here s := string(bytes)
Comments
Post a Comment