FAQ
http://play.golang.org/p/UB4arZDFrI

With the code example above, I'm wondering if there is any way to avoid the
MarshalJSON() boiler plate on Child?
Just wondering if there is a trick, if there isn't then I'm fine with doing
it.

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Maxim Khitrov at Feb 18, 2013 at 2:32 am

    On Sun, Feb 17, 2013 at 9:20 PM, wrote:
    http://play.golang.org/p/UB4arZDFrI

    With the code example above, I'm wondering if there is any way to avoid the
    MarshalJSON() boiler plate on Child?
    Just wondering if there is a trick, if there isn't then I'm fine with doing
    it.
    http://play.golang.org/p/lrrVqD2Kqk

    It's called an embedded field:

    http://golang.org/ref/spec#Struct_types

    - Max

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedFeb 18, '13 at 2:21a
activeFeb 18, '13 at 2:32a
posts2
users2
websitegolang.org

2 users in discussion

Nobinds: 1 post Maxim Khitrov: 1 post

People

Translate

site design / logo © 2022 Grokbase