#Mapped interfaces

9 messages · Page 1 of 1 (latest)

versed mountain
#

I am having trouble with implementing a mapped interface

#

Issue is that when I try to call oapi100.Init, it returns a struct of oapi100.API100 which implementes the APIEngine it doesn't work

#

cannot use oapi100.Init (value of type func(logEngine *olog.LogEngine) oapi100.API100) as APIEngine value in map literal: func(logEngine *olog.LogEngine) oapi100.API100 does not implement APIEngine (missing method Bind)

bronze mango
#

you are not calling Init

#

you are passing Init itself

versed mountain
#

But I want to call init when I build the map if possible

#

Hmm, I just figured out a solution

#

Since each one needs a logging engine, and Init is more to create vars, I will simply add a "AddLogger" method and have it be called following Init