diff --git a/cmd/api/main.go b/cmd/api/main.go index 8e5cb19..c3a8e2d 100644 --- a/cmd/api/main.go +++ b/cmd/api/main.go @@ -3,14 +3,20 @@ package main import ( "crypto/rand" "crypto/rsa" + "flag" "log" "net/rpc" "git.xeserv.us/xena/route/routerpc" ) +var ( + addr = flag.String("addr", "127.0.0.1:9234", "RPC host to connect to") +) + func main() { - client, err := rpc.DialHTTP("tcp", "127.0.0.1:9234") + flag.Parse() + client, err := rpc.DialHTTP("tcp", *addr) if err != nil { log.Fatal(err) }