Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4. "fmt"
  5. "plugin"
  6. )
  7.  
  8. func main() {
  9. p, _ := plugin.Open("./myplugin.so")
  10. add, _ := p.Lookup("Add")
  11. sum := add.(func(int, int) int)(1, 2)
  12. fmt.Println(sum)
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement