|
|
|
|
|
by Zambyte
398 days ago
|
|
My comment is explaining how > A good API should just accept either,e.g. the union of []byte and io.Reader. could be done. Can you elaborate on how the fact that io.Reader is an interface lets you accept a []byte in the API? To my knowledge, the answer is: you can't. You have to wrap the []byte in an io.Reader, and you are at the exact problem described in the article. |
|