You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import (
"bytes"
"io"
"log"
)
// A version of bytes.Buffer without ReadFrom and WriteTo
type Buffer struct {
bytes.Buffer
io.ReaderFrom // conflicts with and hides bytes.Buffer's ReaderFrom.
io.WriterTo // conflicts with and hides bytes.Buffer's WriterTo.
}
func main() {
b := new(Buffer)
var i interface{} = b
if v, ok := i.(io.WriterTo); ok {
log.Println("error", v)
}
}
---- output ------
error
The text was updated successfully, but these errors were encountered:
---- output ------
The text was updated successfully, but these errors were encountered: