Re: [go-nuts] Underlying type constraints and pointers

2022-11-01 Thread 'Aaron Beitch' via golang-nuts
he future, but not right now. >> >> On Sat, Oct 22, 2022 at 7:12 AM Axel Wagner >> wrote: >> >>> (or, for convenience, you can use a type alias `type foo = struct{ data >>> []string }`, which should allow you to write ~foo. >>> >>> On Sat,

[go-nuts] Underlying type constraints and pointers

2022-10-21 Thread 'Aaron Beitch' via golang-nuts
Hello, I would like to provide some helper functions that work on pointer types and having trouble getting it to work with ~ type constraints. Here is the problem in code: https://go.dev/play/p/z0sKEsUaL_d I have types Foo and Bar. Bar's underlying type is Foo. I want a function that takes in