pnyx/cmd/client/main.go

23 lines
376 B
Go

package main
import (
"fmt"
"os"
"git.metznet.ca/MetzNet/pnyx"
)
func main() {
client, err := pnyx.NewClient(nil)
if err != nil {
panic(err)
}
server_public, secret, err := client.Connect(os.Args[1])
if err != nil {
panic(err)
}
fmt.Printf("Started session %s with %s", pnyx.ID[pnyx.SessionID](secret), pnyx.ID[pnyx.ClientID](server_public))
}