Created
March 11, 2017 23:24
-
-
Save andyleap/733fbf5ab8d80aaa3af0aa33261589f3 to your computer and use it in GitHub Desktop.
Simple RPC system!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"rpctest/client" | |
) | |
func main() { | |
fmt.Println(rpctest.Add(1, 2)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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