// Connect connects to func Connect() *admin.Conn { admin, err := admin.Connect(nil) if err != nil { fmt.Fprintln(os.Stderr, "Could not connect to cjdns:", err) os.Exit(1) } return admin }
func main() { fmt.Println("Hello World!") conn, err := admin.Connect(nil) if err != nil { fmt.Println(err) return } results, err := conn.InterfaceController_peerStats() if err != nil { fmt.Println(err) return } pretty.Print(results) }
func main() { Pretty := pretty.Config{ PrintStringers: true, } conn, err := admin.Connect(nil) if err != nil { fmt.Println(err) return } results, err := conn.InterfaceController_peerStats() if err != nil { fmt.Println(err) return } Pretty.Print(results) }