Works!
What a strange behavior... I'll create the issue - or even two on the
github later today.
Thanks Sebastien for your help!
W dniu poniedziałek, 7 listopada 2016 12:58:52 UTC+1 użytkownik Sebastien
Binet napisał:
>
>
>
> On Mon, Nov 7, 2016 at 12:44 PM, Seb Binet > wrote:
>
>>
>>
>> On
On Mon, Nov 7, 2016 at 12:44 PM, Seb Binet wrote:
>
>
> On Sun, Nov 6, 2016 at 8:21 PM, Mateusz Dymiński
> wrote:
>
>> I haven't played with the plugin feature yet, but some things stand out
>>> to me about your code and I wonder if it is correct or not.
>>> Is there a difference in using go bui
On Sun, Nov 6, 2016 at 8:21 PM, Mateusz Dymiński wrote:
> I haven't played with the plugin feature yet, but some things stand out to
>> me about your code and I wonder if it is correct or not.
>> Is there a difference in using go build vs go run, in the same way as you
>> can get bad behaviour us
>
> I haven't played with the plugin feature yet, but some things stand out to
> me about your code and I wonder if it is correct or not.
> Is there a difference in using go build vs go run, in the same way as you
> can get bad behaviour using go run with more complex apps?
Have you tried movin
I haven't played with the plugin feature yet, but some things stand out to
me about your code and I wonder if it is correct or not.
Is there a difference in using go build vs go run, in the same way as you
can get bad behaviour using go run with more complex apps?
Have you tried moving those plug
Does it mean that I can't load the two different plugins ?
I know that I can't load the same plugin twice, but I thought that I can
load two different plugins.
To be precise I was thinking about the MapReduce implementation where the
client might build the go program which can be loaded as plu
AFAIK it's a design decision that a plugin cannot be loaded twice.
Protect it with a sync.Once, if you can't avoid calling the loader twice.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails
I started to play with this new plugin feature and I got some problems when
I tried to load two different plugins one by one.
If I have first plugin as it was describe in the original post and new one:
*Interface:*
package processor
type Processor interface {
Process(text string)
}
*And implem
A, thanks a lot for your help and sorry for trivial question.
To test the type assertion I should use following code:
printerImpl, ok := p.(*printer.Printer)
if !ok {
panic("wrong type")
}
(*printerImpl).Print("test")
I was trying to call the 'Print' func as *printerImpl.Print("test") no
The Lookup method is returning a pointer to the symbol (That way the
program can modify the value of Impl through the plugin.)
I believe you can write:
printerImpl := *p.(*printer.Printer)
On Thu, Nov 3, 2016 at 9:44 AM, Ian Lance Taylor wrote:
> [ +crawshaw ]
>
> On Thu, Nov 3, 2016 at 12:51 A
[ +crawshaw ]
On Thu, Nov 3, 2016 at 12:51 AM, Mateusz Dymiński wrote:
> Hi,
>
> I am trying to load dynamically implementation of particular interface. I've
> created the example in following repo:
> https://github.com/mateuszdyminski/go-plugin
>
> I have interface - let's call it Printer:
> pac
Hi,
I am trying to load dynamically implementation of particular interface.
I've created the example in following
repo: https://github.com/mateuszdyminski/go-plugin
I have interface - let's call it Printer:
package printer
type Printer interface {
Print(text string)
}
And implementation of t
12 matches
Mail list logo