You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/10/03 22:51:51 UTC

incubator-mynewt-newt git commit: newt - Sort setting history alphabetically.

Repository: incubator-mynewt-newt
Updated Branches:
  refs/heads/develop 8a77a1939 -> c1479e9ba


newt - Sort setting history alphabetically.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/c1479e9b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/c1479e9b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/c1479e9b

Branch: refs/heads/develop
Commit: c1479e9baf249a144e9dbe876501787e85e04939
Parents: 8a77a19
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Oct 3 15:51:30 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon Oct 3 15:51:30 2016 -0700

----------------------------------------------------------------------
 newt/syscfg/syscfg.go | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/c1479e9b/newt/syscfg/syscfg.go
----------------------------------------------------------------------
diff --git a/newt/syscfg/syscfg.go b/newt/syscfg/syscfg.go
index 2b6b0c4..14dbaf9 100644
--- a/newt/syscfg/syscfg.go
+++ b/newt/syscfg/syscfg.go
@@ -572,7 +572,13 @@ func (cfg *Cfg) ErrorText() string {
 	}
 
 	str += "\nSetting history:\n"
+	interestingSlice := make([]string, 0, len(interestingNames))
 	for name, _ := range interestingNames {
+		interestingSlice = append(interestingSlice, name)
+	}
+	sort.Strings(interestingSlice)
+
+	for _, name := range interestingSlice {
 		entry := cfg.Settings[name]
 		str += fmt.Sprintf("    %s: %s\n", name,
 			historyToString(entry.History))