package main

import (
	"context"
	"flag"
	"fmt"
	"git.nspix.com/golang/micro/gateway/cli"
	"net"
)

var (
	AddrFlag = flag.String("addr", "192.168.6.76:6567", "server address")
)

func main() {
	flag.Parse()
	if conn, err := net.Dial("tcp", *AddrFlag); err == nil {
		if err = cli.OpenInteractive(context.Background(), conn); err != nil {
			fmt.Println(err.Error())
		}
	} else {
		fmt.Println(err.Error())
	}
}
