Skip to content

Commit

Permalink
moved sort to more logical place
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevenson Jean-Pierre committed Jul 29, 2016
1 parent cfa4228 commit 66ab916
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)

Expand Down
2 changes: 1 addition & 1 deletion vpn_host_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 66ab916

Please sign in to comment.