我需要刪除地圖中的條目。我嘗試使用“刪除”命令:var actionResponseChannels = map[string]chan structs.ActionResponse{}...delete(actionResponseChannels, refID)但我從 go 中得到一個錯誤:不能在要刪除的參數中使用 actionResponseChannels (type map[string]chan structs.ActionResponse) 作為類型 http.ResponseWriter: map[string]chan structs.ActionResponse 沒有實現 http.ResponseWriter (缺少 Header 方法)go 不能使用 refID (type string ) 作為類型 *http.Request 在 deletego 的參數中在我看來,刪除與地圖功能無關。我正在使用 GO 版本 1.13.8 Linux/amd64。有沒有辦法處理這個?謝謝。
- 1 回答
- 0 關注
- 128 瀏覽
添加回答
舉報
0/150
提交
取消