FAQ
The following code: http://play.golang.org/p/8TGXurolYE

produces the following output:

true, truetrue, false


Can someone help me understand why while foo is nil in both cases, the
error is not?

Thanks,
Keyur

--
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

  • Andrey mirtchovski at Jul 31, 2013 at 6:46 pm
    I think this covers it:

    http://golang.org/doc/faq#nil_error
    On Tue, Jul 30, 2013 at 3:54 PM, wrote:
    The following code: http://play.golang.org/p/8TGXurolYE

    produces the following output:

    true, true
    true, false


    Can someone help me understand why while foo is nil in both cases, the error
    is not?

    Thanks,
    Keyur

    --
    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.
    --
    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.
  • Keyur Shah at Aug 1, 2013 at 9:40 pm
    Thank you.
    On Wednesday, July 31, 2013 11:46:30 AM UTC-7, andrey mirtchovski wrote:

    I think this covers it:

    http://golang.org/doc/faq#nil_error
    On Tue, Jul 30, 2013 at 3:54 PM, <key...@gmail.com <javascript:>> wrote:
    The following code: http://play.golang.org/p/8TGXurolYE

    produces the following output:

    true, true
    true, false


    Can someone help me understand why while foo is nil in both cases, the error
    is not?

    Thanks,
    Keyur

    --
    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/groups/opt_out.
    --
    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
postedJul 31, '13 at 6:42p
activeAug 1, '13 at 9:40p
posts3
users2
websitegolang.org

2 users in discussion

Keyur Shah: 2 posts Andrey mirtchovski: 1 post

People

Translate

site design / logo © 2021 Grokbase