Skip to content

Commit

Permalink
Sort stanzas by name
Browse files Browse the repository at this point in the history
  • Loading branch information
ursm committed Oct 16, 2019
1 parent 5530280 commit f845e37
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"os"
"path"
"path/filepath"
"sort"
"text/template"
"time"

Expand Down Expand Up @@ -253,6 +254,9 @@ func (sp *StanzaProvider) Stanzas() []*stanza.Stanza {
stanzas[i] = stanza
i++
}
sort.Slice(stanzas, func(i, j int) bool {
return stanzas[i].Name < stanzas[j].Name
})
return stanzas
}

Expand Down

0 comments on commit f845e37

Please sign in to comment.