chan.go 248 B

12345678
  1. package generics
  2. import "golang.org/x/exp/constraints"
  3. // I can't seem to make a common function for things the make function works with. "no core type"
  4. func MakeChanWithLen[T chan U, U any, L constraints.Integer](m *T, l L) {
  5. *m = make(T, l)
  6. }