Skip to content

Instantly share code, notes, and snippets.

@chetangiridhar
Created March 5, 2019 03:59
Show Gist options
  • Save chetangiridhar/838cada2d4c293624cf569de48548da4 to your computer and use it in GitHub Desktop.
Save chetangiridhar/838cada2d4c293624cf569de48548da4 to your computer and use it in GitHub Desktop.
Go plugin
package main
import "fmt"
// Add two integers
func Add(a int, b int) int {
fmt.Printf("\nAdding a=%d and b=%d", a, b)
return a + b
}
// Sub two integers
func Sub(a int, b int) int {
fmt.Printf("\nSubtracting b= %d from a=%d", b, a)
return a - b
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment