Skip to content

Commit

Permalink
Fix append issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Dec 21, 2015
1 parent b08d10a commit c8a25c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions command/agent_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ func (c *AgentInfoCommand) Run(args []string) int {
for _, key := range statsKeys {
c.Ui.Output(key)
statsData, _ := stats[key].(map[string]interface{})
statsDataKeys := make([]string, 0, len(statsData))
statsDataKeys := make([]string, len(statsData))
i := 0
for key := range statsData {
statsDataKeys = append(statsDataKeys, key)
statsDataKeys[i] = key
i++
}
sort.Strings(statsDataKeys)

Expand Down

0 comments on commit c8a25c6

Please sign in to comment.