Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- "plugin"
- )
- func main() {
- p, _ := plugin.Open("./myplugin.so")
- add, _ := p.Lookup("Add")
- sum := add.(func(int, int) int)(1, 2)
- fmt.Println(sum)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement