generated from devnw/oss-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
This doesn't compile. It should work.
package main
import (
"bufio"
"bytes"
"fmt"
"io"
"strings"
)
func main() {
readers := As[io.Reader](
strings.NewReader(""),
bufio.NewReader(strings.NewReader("")),
bytes.NewBuffer([]byte("")),
)
fmt.Printf("%T\n", readers)
buffers1 := []*bytes.Buffer{
bytes.NewBuffer([]byte("")),
bytes.NewBuffer([]byte("")),
bytes.NewBuffer([]byte("")),
bytes.NewBuffer([]byte("")),
bytes.NewBuffer([]byte("")),
}
// breaders := As[io.Reader](buffers1...)
stringrs := []*strings.Reader{
strings.NewReader(""),
}
strs := As[io.Reader](stringrs...)
var all []io.Reader
// all = append(all, buffers1...)
all = Merge[io.Reader](breaders...)
}
func As[T any](in ...T) []T {
return in
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working