On Tue, Feb 7, 2017 at 5:57 PM, 高橋誠二 <[email protected]> wrote:
> https://play.golang.org/p/KEGDmlLEZZ
>
> like this, can't use var model ModelObject as FooModel struct.
> I'd like to use model as FooModel variable, after inserting &FooModel{Id: 1}
> to model.
> Why this happen?

The only thing you can do with a value of interface type is call
methods on it, or use a type assertion to convert it to some other
type.

Ian

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to