FAQ
Hi all,
Can someone explain to me why this code
<http://play.golang.org/p/BBAxDP2yDk>, let you put a struct1 into struct2
but not struct3???

Thanks for the help :)

--
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/d/optout.

Search Discussions

  • Andrey mirtchovski at Mar 17, 2016 at 1:52 am
    from https://golang.org/ref/spec#Type_identity:

    "Two struct types are identical if they have the same sequence of
    fields, and if corresponding fields have the same names, and identical
    types, and identical tags."
    On Wed, Mar 16, 2016 at 6:55 PM, B wrote:
    Hi all,
    Can someone explain to me why this code, let you put a struct1 into struct2
    but not struct3???

    Thanks for the help :)

    --
    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/d/optout.
    --
    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/d/optout.
  • B at Mar 17, 2016 at 9:04 am
    Thanks
    On Thursday, March 17, 2016 at 2:53:03 AM UTC+1, andrey mirtchovski wrote:

    from https://golang.org/ref/spec#Type_identity:

    "Two struct types are identical if they have the same sequence of
    fields, and if corresponding fields have the same names, and identical
    types, and identical tags."

    On Wed, Mar 16, 2016 at 6:55 PM, B <benny...@gmail.com <javascript:>>
    wrote:
    Hi all,
    Can someone explain to me why this code, let you put a struct1 into struct2
    but not struct3???

    Thanks for the help :)

    --
    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...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/d/optout.
    --
    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/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMar 17, '16 at 1:33a
activeMar 17, '16 at 9:04a
posts3
users2
websitegolang.org

2 users in discussion

B: 2 posts Andrey mirtchovski: 1 post

People

Translate

site design / logo © 2022 Grokbase