From 34e87e70269065bd9808890c1e5648cacf539ed7 Mon Sep 17 00:00:00 2001 From: Evan Phoenix Date: Mon, 18 May 2015 11:54:59 -0700 Subject: [PATCH] Sort the plugins so the order is consintent --- agent.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/agent.go b/agent.go index 4b5f77fe6..5eca31992 100644 --- a/agent.go +++ b/agent.go @@ -77,8 +77,16 @@ func (agent *Agent) Connect() error { func (a *Agent) LoadPlugins() ([]string, error) { var names []string - for name, creator := range plugins.Plugins { - plugin := creator() + var pluginNames []string + + for name, _ := range plugins.Plugins { + pluginNames = append(pluginNames, name) + } + + sort.Strings(pluginNames) + + for _, name := range pluginNames { + plugin := plugins.Plugins[name]() err := a.Config.Apply(name, plugin) if err != nil {