If you look at the example given the function accepts the base type and then tries to call the function needing the extended type - pretty sure you can’t do this with embedding as the type is erased when the outer function is called. You need an interface afaik. On May 11, 2025, at 8:43 PM, Jason E. Aten <j.e.a...@gmail.com> wrote: -- 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 visit https://groups.google.com/d/msgid/golang-nuts/75913DC6-E8EE-44A0-AD94-C3066E433379%40ix.netcom.com. |
- [go-nuts] Adding methods to non local ty... Alexander Shopov
- Re: [go-nuts] Adding methods to non... Jason E. Aten
- Re: [go-nuts] Adding methods to... Robert Engels
- Re: [go-nuts] Adding methods to non... 'Axel Wagner' via golang-nuts
- Re: [go-nuts] Adding methods to... 'Axel Wagner' via golang-nuts
- Re: [go-nuts] Adding method... Alexander Shopov
- Re: [go-nuts] Adding me... Alexander Shopov
- Re: [go-nuts] Addi... Jason E. Aten
- Re: [go-nuts] ... Alexander Shopov
- Re: [go-nu... Robert Engels
- Re: [go-nu... Jason E. Aten
- Re: [go-nu... Robert Engels
- Re: [go-nu... 'Michael Knyszek' via golang-nuts