This commit is contained in:
evilsocket 2019-03-18 13:12:42 +01:00
commit a5116d3533
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

@ -39,7 +39,7 @@ type moduleJSON struct {
} }
func (mm ModuleList) MarshalJSON() ([]byte, error) { func (mm ModuleList) MarshalJSON() ([]byte, error) {
mods := make(map[string]moduleJSON) mods := []moduleJSON{}
for _, m := range mm { for _, m := range mm {
mJSON := moduleJSON{ mJSON := moduleJSON{
Name: m.Name(), Name: m.Name(),
@ -50,7 +50,7 @@ func (mm ModuleList) MarshalJSON() ([]byte, error) {
Running: m.Running(), Running: m.Running(),
State: m.Extra(), State: m.Extra(),
} }
mods[m.Name()] = mJSON mods = append(mods, mJSON)
} }
return json.Marshal(mods) return json.Marshal(mods)
} }