package main

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

var (
	AddrFlag = flag.String("addr", "127.0.0.1:8080", "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())
	}
}