Hi, How to architect the OO's virtual function in Go?
Please take a look at this (not working) Go program https://play.golang.org/p/qrBX6ScABp Please think of the "func Output()" as a very complicated function that I only want to define *once *at the base level, not to duplicate into each sub classes. How can I make it works so that the last output statement, instead of being, fmt.Printf("[%v] %s: [%0.2f]\n", k, v.Name(), v.Area()) will be this instead: fmt.Printf("[%v] %s\n", k, v.Output()) Thanks -- 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. For more options, visit https://groups.google.com/d/optout.