From 17320e2123f136d10bb815944cd8fd48334adea8 Mon Sep 17 00:00:00 2001 From: wuqingtao Date: Thu, 26 Dec 2019 22:01:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8D=95=E8=AF=8D=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- baidu/aip/client/client.go | 2 +- baidu/aip/client/error.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/baidu/aip/client/client.go b/baidu/aip/client/client.go index 78cc4f3..b9caa56 100644 --- a/baidu/aip/client/client.go +++ b/baidu/aip/client/client.go @@ -360,7 +360,7 @@ func (c *Client) parseReponse(resp *http.Response, typ string, v interface{}) (e if v == nil { return nil } - if err = json.Unmarshal(res.Reult, v); err != nil { + if err = json.Unmarshal(res.Result, v); err != nil { return fmt.Errorf("parse %s data: %w", typ, err) } default: diff --git a/baidu/aip/client/error.go b/baidu/aip/client/error.go index 67bb6dc..d9e7911 100644 --- a/baidu/aip/client/error.go +++ b/baidu/aip/client/error.go @@ -24,7 +24,7 @@ type Response struct { // cached Cached int `json:"cached,omitempty"` // 响应结果 - Reult json.RawMessage `json:"result,omitempty"` + Result json.RawMessage `json:"result,omitempty"` } // Code 实现RequestError