fix "call of Unmarshal passes non-pointer as second argument"

This commit is contained in:
Chris Lu
2020-04-17 10:04:41 -07:00
parent 826f96b6f3
commit e0f5996560

View File

@@ -117,7 +117,7 @@ func Delete(url string, jwt string) error {
return nil return nil
} }
m := make(map[string]interface{}) m := make(map[string]interface{})
if e := json.Unmarshal(body, m); e == nil { if e := json.Unmarshal(body, &m); e == nil {
if s, ok := m["error"].(string); ok { if s, ok := m["error"].(string); ok {
return errors.New(s) return errors.New(s)
} }