diff --git a/main.go b/main.go index 8b593a4..3bb2887 100644 --- a/main.go +++ b/main.go @@ -39,7 +39,7 @@ var ( profileCommandRegex = regexp.MustCompile(`^profile`) disconnectCommandRegex = regexp.MustCompile(`^disconnect`) //Global Vars - cliVersion = "0.0.2" + cliVersion = "0.0.3" resourcePath = path.Join(os.Getenv("HOME"), ".vpn_host_manager") ) diff --git a/vpn_host_manager.go b/vpn_host_manager.go index fe6d1af..153d5bb 100644 --- a/vpn_host_manager.go +++ b/vpn_host_manager.go @@ -150,12 +150,12 @@ func readHostsJSONFile() vpnInstanceGrp { } var vpnHosts vpnInstanceGrp json.Unmarshal(file, &vpnHosts) + sort.Sort(vpnHosts) return vpnHosts } func printVPNHostList() { vpnHostsList := readHostsJSONFile() - sort.Sort(vpnHostsList) consoleTable := tablewriter.NewWriter(os.Stdout) consoleTable.SetHeader(vpnInstanceFieldNames) for index, vpnHost := range vpnHostsList {