From aa1b876a6915895cd588a3c6c80f04641ef19828 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Sun, 28 Jun 2015 08:24:29 -0400 Subject: [PATCH] sort the keys before returning them --- section.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/section.go b/section.go index c33fe34..c4a612c 100644 --- a/section.go +++ b/section.go @@ -4,6 +4,7 @@ import ( "encoding/json" "errors" "fmt" + "sort" "strings" ) @@ -197,6 +198,7 @@ func (section *Section) Keys() []string { keys = append(keys, key) } + sort.Strings(keys) return keys }