Open
Description
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
Metadata
Metadata
Assignees
Labels
No labels