Explorar o código

修改对象类型错误

larry.liu %!s(int64=6) %!d(string=hai) anos
pai
achega
254ac9d7a6
Modificáronse 1 ficheiros con 2 adicións e 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 {