func ReadEndpoints(filename string) (map[string]string, map[string]string, error) {
	region := make(map[string]string)
	endpoints := make(map[string]string)
	f, err := os.Open(filename)
	if err != nil {
		log.Fatal(err)
	}
	defer f.Close()
	lines, err := csv.NewReader(f).ReadAll()
	if err != nil {
		log.Fatal(err)
	}
	for i, line := range lines {
		if i != 0 {
			region[line[0]] = line[1]
			endpoints[line[0]] = line[2]
		}
	}
	return region, endpoints, err
}
ReadEndpoints parse CSV file into map of region names and endpoints
package ping
import (
	"crypto/tls"
	"encoding/csv"
	"fmt"
	"log"
	"net/http"
	"net/http/httptrace"
	"os"
	"runtime"
	"strconv"
	"strings"
	"text/tabwriter"
	"time"
	"github.com/fatih/color"
)
const (
	httpsTemplate = `` +
		`  DNS Lookup   TCP Connection   TLS Handshake   Server Processing   Content Transfer` + "\n" +
		`[%s  |     %s  |    %s  |        %s  |       %s  ]` + "\n" +
		`            |                |               |                   |                  |` + "\n" +
		`   namelookup:%s      |               |                   |                  |` + "\n" +
		`                       connect:%s     |                   |                  |` + "\n" +
		`                                   pretransfer:%s         |                  |` + "\n" +
		`                                                     starttransfer:%s        |` + "\n" +
		`                                                                                total:%s` + "\n"
)
type CmdOption struct {
	Option     string
	OptionName string
	ListFlg    bool
	Args       []string
}
func (c *CmdOption) StartCmd() {
	var regions = make(map[string]string)
	var endpoints = make(map[string]string)
	var err error
	var csvpath string
	homedir := os.Getenv("PINGCLOUD_DIR")
	fmt.Println("")
	if runtime.GOOS == "windows" {
		csvpath = fmt.Sprintf("\\endpoints\\%s.csv", c.Option)
	} else {
		csvpath = fmt.Sprintf("/endpoints/%s.csv", c.Option)
	}
	regions, endpoints, err = ReadEndpoints(homedir + csvpath)
	if err != nil {
		log.Fatal(err)
	}
	if c.ListFlg {
		tr := tabwriter.NewWriter(os.Stdout, 40, 8, 2, '\t', 0)
		fmt.Fprintf(tr, "%s Region Code\t%s Region Name", c.OptionName, c.OptionName)
		fmt.Fprintln(tr)
		fmt.Fprintf(tr, "------------------------------\t------------------------------")
		fmt.Fprintln(tr)
		for r, n := range regions {
			fmt.Fprintf(tr, "[%v]\t[%v]", r, n)
			fmt.Fprintln(tr)
		}
		tr.Flush()
	} else if len(c.Args) == 0 {
		tr := tabwriter.NewWriter(os.Stdout, 40, 8, 2, '\t', 0)
		fmt.Fprintf(tr, "%s Region Code\t%s Region Name\tLatency", c.OptionName, c.OptionName)
		fmt.Fprintln(tr)
		fmt.Fprintf(tr, "------------------------------\t------------------------------\t------------------------------")
		fmt.Fprintln(tr)
		tr.Flush()
		for r, i := range endpoints {
			p := PingDto{
				Region:  r,
				Name:    regions[r],
				Address: i,
			}
			p.Ping()
		}
		fmt.Println("")
		fmt.Println("You can also add region after command if you want http trace information of the specific region")
		if c.Option == "gcp" {
			fmt.Printf("ex> pingcloud-cli %s us-central1\n", c.Option)
		} else if c.Option == "aws" {
			fmt.Printf("ex> pingcloud-cli %s us-east-1\n", c.Option)
		} else if c.Option == "azure" {
			fmt.Printf("ex> pingcloud-cli %s koreasouth\n", c.Option)
		}
	} else {
		for _, r := range c.Args {
			if i, ok := endpoints[r]; ok {
				p := PingDto{
					Region:  r,
					Name:    endpoints[r],
					Address: i,
				}
				p.VerbosePing()
			} else {
				fmt.Printf("Region code [%v] is wrong.  To check available region codes run the command with -l or --list flag\n", r)
				fmt.Printf("Usage: pingcloud-cli %s -l\n", c.Option)
				fmt.Printf("Usage: pingcloud-cli %s --list\n", c.Option)
			}
		}
	}
	fmt.Println("")
}