Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Submit resource tags in a predictable order
Browse files Browse the repository at this point in the history
  • Loading branch information
nettoclaudio authored and psycofdj committed Jan 22, 2021
1 parent 5884079 commit 6c49a69
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cloudstack/ResourcetagsService.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"encoding/json"
"fmt"
"net/url"
"sort"
"strconv"
"strings"
)
Expand Down Expand Up @@ -527,3 +528,12 @@ type Tag struct {
Resourcetype string `json:"resourcetype"`
Value string `json:"value"`
}

func getSortedKeysFromMap(m map[string]string) []string {
var keys []string
for k := range m {
keys = append(keys, k)
}
sort.Strings(keys)
return keys
}

0 comments on commit 6c49a69

Please sign in to comment.