Explorar el Código

修改对象类型错误

larry.liu hace 6 años
padre
commit
254ac9d7a6
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      device/bind.go

+ 2 - 2
device/bind.go

@@ -27,7 +27,7 @@ func (d *Device) Bind(req ReqBind) (err error) {
 		return
 	}
 	var result resBind
-	if err = json.Unmarshal(response, result); err != nil {
+	if err = json.Unmarshal(response, &result); err != nil {
 		return
 	}
 	if result.BaseResp.ErrCode != 0 {
@@ -49,7 +49,7 @@ func (d *Device) Unbind(req ReqBind) (err error) {
 		return
 	}
 	var result resBind
-	if err = json.Unmarshal(response, result); err != nil {
+	if err = json.Unmarshal(response, &result); err != nil {
 		return
 	}
 	if result.BaseResp.ErrCode != 0 {