Go isn't polymorphic, whenever your String() function is called, it's on
BaseFoo, you have to do it like this:

https://play.golang.org/p/69rw0jRPalz

On Fri, May 8, 2020 at 1:43 PM Glen Newton <[email protected]> wrote:

> Thanks!
>
> Oh no, when I try that here: https://play.golang.org/p/RV-S4MJWYUi
> Did not work: similar results: instead of:
>
> BaseFoo
> BaseFoo
> BaseFoo
> BaseFoo
>
> now I get:
> main.BaseFoo
> main.BaseFoo
> main.BaseFoo
> main.BaseFoo
>
> Other suggestions?  :-)
>
> Thanks,
> Glen
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/53e2c85d-9417-4108-abe3-da436b146fb7%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/53e2c85d-9417-4108-abe3-da436b146fb7%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CA%2Bv29Luxu93-S9VgQj-irgND91RHqheVVb%2BhJnJk7doQdOGFeA%40mail.gmail.com.

Reply via email to