-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plugin: what symbols are exported? #17823
Comments
Also there's no possibility to call FuncA: |
I think the docs are clear: "A symbol is any exported variable or function." |
How to call then a function returning a struct? |
You can extract the struct type from the function:
Whether or not the plugin package listed exported types among symbols, if you don't have the type statically imported into the host, you are stuck using reflection to work with it. The effort of extracting the return type from a function is small compared to what will be necessary to work with it via reflection. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version devel +2b445c7 Sat Nov 5 23:59:04 2016 +0000 darwin/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
plugin.go
:host.go
:What did you expect to see?
I would expect that all public symbols are exported (all defined types, functions, vars and constants).
What did you see instead?
Instead I can see:
The text was updated successfully, but these errors were encountered: