sorry, a mistake, "int" -> "[]byte". On Friday, November 12, 2021 at 1:08:50 PM UTC+8 tapi...@gmail.com wrote:
> > package main > > import ( > "fmt" > ) > > type byteview interface{string | int} > > type ByteView[T byteview] struct {v [0]T} > > func (bv ByteView[T]) Write(v T) (int, error) { > return 0, nil > } > > type Writer[T byteview] interface { > Write(bs T)(int, error) > } > > type ioWriter = Writer[[]byte] // []byte does not satisfy comparable > > func main() { > fmt.Println("Hello, playground") > } > -- 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/5342cd82-a51f-4d9d-af79-d7a5e2a1b663n%40googlegroups.com.