Hello

i was playing with the plugin mode and i met this error

*panic: interface conversion: interface {} is func(string, func([]string) 
error) error, not func(string, func([]string) error) error (types from 
different scopes)*

the code is a regular conversion, without test because i was not expecting 
such failure, something like *x := arg.(func(...))*

as https://github.com/golang/go/issues/26094 i understand that i declared a 
type with identical signature but within two different programming scopes.

i was working with go1.11 when i got that error specifically. 
go1.10 is also having this behavior, the error is a bit less expressive.

the binary file was build with *go build .... -buildmode=plugin ...*
the program does not break during the plugin loading sequence, 
it breaks later at runtime with a panic as demonstrated.

its unmanageable behavior for me, i have no way to overcome that error,
i wonder if there is anyway i can dynamically load generated code,
i wonder if this behavior is intended to remain forever.

thank you

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