You have to convert int 32 to int .

On Wednesday, October 9, 2013 at 12:41:03 AM UTC+5:30, Tong Sun wrote:
>
> Hi, 
>
> I'm trying to assign a variable of type interface {} int32 to another 
> variable 
> of type int, and here are the all the errors that I'm getting:
>
> - cannot use id (type interface {}) as type int in assignment: need type 
> assertion
>
> - panic: interface conversion: interface is int32, not int
>
> - cannot use id.(int32) (type int32) as type int in assignment
>
> - invalid type assertion: id.(int32).(int) (non-interface type int32 on 
> left)
>
> what's the proper way to do it? 
>
> thanks
>
>
>

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