Saturday, April 10, 2021

Writer interface does opposite of reader interface.








Function signature is similar to reader interface.





IO Copy




Example:

io.Copy(os.Stdout, resp.Body)


resp.Body - implements Reader interface (source)

os.Stdout - implements Writer interface (destination)





No comments:

Post a Comment