Very true. On Monday, April 13, 2020 at 1:37:09 AM UTC+6, Amnon Baron Cohen wrote: > > Go is a simple language. > > Code in Go does what it says. No magic. > > That is its beauty. That is its power. > > On Sunday, 12 April 2020 03:59:08 UTC+1, Tanmay Das wrote: >> >> Say you have a struct Foo and you access fields and call methods on it as >> you normally would. But is it possible to execute a hook before or after >> that field access or method call? A good scenario will be: >> >> The user calls non-existent method foo.Bar() or accesses non-existent >> field foo.Bar. If they don't exist, I want to: >> a) In case of a method call: forward that call to foo.Baz() >> b) In case of field access: set the foo.Bar at runtime with some value >> >
-- 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 on the web visit https://groups.google.com/d/msgid/golang-nuts/5ba3c780-76aa-445b-8ac8-48ffb2eaaf60%40googlegroups.com.