Skip to content

Instantly share code, notes, and snippets.

@andyleap
Created March 11, 2017 23:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andyleap/733fbf5ab8d80aaa3af0aa33261589f3 to your computer and use it in GitHub Desktop.
Save andyleap/733fbf5ab8d80aaa3af0aa33261589f3 to your computer and use it in GitHub Desktop.
Simple RPC system!
package main
import (
"fmt"
"rpctest/client"
)
func main() {
fmt.Println(rpctest.Add(1, 2))
}
package rpctest
import (
"log"
)
func Add(a, b int) int {
log.Printf("%d + %d = %d", a, b, a+b)
return a + b
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment