This has been discussed in the proposal issue:
https://github.com/golang/go/issues/41190#issuecomment-722342397
I'm not sure this will give you a satisfactory answer, but at least it
proves the team is aware :)

On Mon, Dec 21, 2020 at 4:14 PM diegoaugu...@gmail.com <
diegoaugustomol...@gmail.com> wrote:

> Hi,
> I was reading https://tip.golang.org/pkg/io/fs/#File and noticed that
> interface File is not embedding io.ReadCloser. Even though the signature of
> the methods are identical, It would probably be a good idea to embed
> io.ReadCloser (or both io.Reader and io.Closer) to state the intention of
> making them compatible (and also have the excellent documentation on how to
> implement those methods).
> So my actual question could be rephrased: is io/fs.File's Read and Close
> methods intended to be used in the exact same way as io.ReadCloser? If so,
> is there a reason why it is re-defining those two methods on its own? If
> not, wouldn't it be better to have different method names to avoid any
> confusion?
>
> Thank you!
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/5d7238d9-ce52-4c5d-95b2-c0d0a5346a7bn%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/5d7238d9-ce52-4c5d-95b2-c0d0a5346a7bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAEkBMfEFQQ%2B4KGiGNCNPOYzf%3DY%2BUYDwtevC8vd6fgUq6-5v0QA%40mail.gmail.com.

Reply via email to