From a5116d353319be0283ca62ae4047a4bd510e4c6f Mon Sep 17 00:00:00 2001 From: evilsocket Date: Mon, 18 Mar 2019 13:12:42 +0100 Subject: [PATCH] revert --- session/module.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/session/module.go b/session/module.go index f7ec2064..dbdf6d1b 100644 --- a/session/module.go +++ b/session/module.go @@ -39,7 +39,7 @@ type moduleJSON struct { } func (mm ModuleList) MarshalJSON() ([]byte, error) { - mods := make(map[string]moduleJSON) + mods := []moduleJSON{} for _, m := range mm { mJSON := moduleJSON{ Name: m.Name(), @@ -50,7 +50,7 @@ func (mm ModuleList) MarshalJSON() ([]byte, error) { Running: m.Running(), State: m.Extra(), } - mods[m.Name()] = mJSON + mods = append(mods, mJSON) } return json.Marshal(mods) }