func loadServers() (arr []server) {
	arr = make([]server, 0)
	fs, _ := ioutil.ReadFile(SssFile)
	if len(fs) == 0 {
		return
	}
	body := string(fs)
	var errs []string
	for _, line := range strings.Split(body, "\n") {
		line = strings.TrimSpace(line)
		if len(line) == 0 || line[0] == '#' || line[0] == '/' {
			continue
		}
		s := parseServerFull(line)
		if s == nil {
			s = parseServerSimp(line)
		}
		if s != nil {
			arr = append(arr, *s)
		} else {
			errs = append(errs, line)
		}
	}
	if len(errs) > 0 {
		fmt.Printf("> some invalid config in file[%v]: \n", SssFile)
		for i, e := range errs {
			fmt.Printf("> %v: %v \n", i+1, e)
		}
		fmt.Println("> press any key to continue")
		getchar()
	}
	return
}
// load servers from config file.
load servers from config file.
// load servers from config file .
func loadServers() (arr []server) {
	arr = make([]server, 0)
	fs, _ := ioutil.ReadFile(SssFile)
	if len(fs) == 0 {
		return
	}
	body := string(fs)
	var errs []string
	for _, line := range strings.Split(body, "\n") {
		line = strings.TrimSpace(line)
		if len(line) == 0 || line[0] == '#' || line[0] == '/' {
			continue
		}
		s := parseServerFull(line)
		if s == nil {
			s = parseServerSimp(line)
		}
		if s != nil {
			arr = append(arr, *s)
		} else {
			errs = append(errs, line)
		}
	}
	if len(errs) > 0 {
		fmt.Printf("> some invalid config in file[%v]: \n", SssFile)
		for i, e := range errs {
			fmt.Printf("> %v: %v \n", i+1, e)
		}
		fmt.Println("> press any key to continue")
		getchar()
	}
	return
}
func loadServers ( ) ( arr [ ] server ) { arr = make ( [ ] server , 0 ) fs , _ := ioutil . ReadFile ( SssFile ) if len ( fs ) == 0 { return } body := string ( fs ) var errs [ ] string for _ , line := range strings . Split ( body , " \n " ) { line = strings . TrimSpace ( line ) if len ( line ) == 0 || line [ 0 ] == '#' || line [ 0 ] == '/' { continue } s := parseServerFull ( line ) if s == nil { s = parseServerSimp ( line ) } if s != nil { arr = append ( arr , * s ) } else { errs = append ( errs , line ) } } if len ( errs ) > 0 { fmt . Printf ( " \n " , SssFile ) for i , e := range errs { fmt . Printf ( " \n " , i + 1 , e ) } fmt . Println ( " " ) getchar ( ) } return }
load servers from config file.
load servers from config file .