migrate icon indicating copy to clipboard operation
migrate copied to clipboard

Refactor: bytes.NewBufferString

Open mattes opened this issue 8 years ago • 0 comments

Replace

ioutil.NopCloser(bytes.NewBufferString())

with

ioutil.NopCloser(strings.NewReader(s string))

... it's being used in the tests.

https://golang.org/pkg/strings/#NewReader

NewReader returns a new Reader reading from s. It is similar to bytes.NewBufferString but more efficient and read-only.

mattes avatar Feb 10 '17 00:02 mattes