Did you assign something to the pointer?

My guess is that you did not, because the code compiles and then fails at 
runtime telling the pointer is NULL.

On Wednesday, July 5, 2017 at 1:19:47 PM UTC+2, Manohar Reddy wrote:
>
> > fmt.Println(optional._32.Magic) // did not work for me: HOW TO ACCESS 
> MAGIC VARIABLE
>
> This line returns null pointer de-reference at run time. 
> Can you please guide me on how what is the  alternative for optional->_32
> ->Magic in Golang?
>
> Thanks
> On Wednesday, July 5, 2017 at 4:42:07 PM UTC+5:30, Jan Mercl wrote:
>>
>> On Wed, Jul 5, 2017 at 1:04 PM Manohar Reddy <b.ma...@gmail.com> wrote:
>>
>> > fmt.Println(optional._32.Magic) // did not work for me: HOW TO ACCESS 
>> MAGIC VARIABLE
>>
>> Who wants to guess what does "did not work for me" mean without having 
>> the source code and the compiler output to look at?
>>
>> Please post a complete example at eg. the Go playgound: 
>> https://play.golang.org/
>>
>> -- 
>>
>> -j
>>
>

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

Reply via email to