cgotest.go 199 B

12345678910111213141516
  1. package main
  2. import "C"
  3. import (
  4. "fmt"
  5. "log"
  6. )
  7. //export Add
  8. func Add(a, b C.int) *C.char {
  9. return C.CString(fmt.Sprintf("Go plugin: %d", a+b))
  10. }
  11. func main() {
  12. log.Println("Main of cgotest")
  13. }