How to put data in a io.Writer into a io.Reader

Viewed 42

I use a library that finally results in the output of this library in an io.Writer is written. Now more I have data on this io.Writer to another library I have to pass that library just io.Reader accepts. What should I do? Is there a way to copy a writer to reader?

// i have a writer and i'll give it to the library 
_ = png.Econde(writer,img)
// Now I need to pass it to another library as a reader 
_ = myLibrary.Read(??)
0 Answers
Related