feat: client debug

master v1.0.14
大虾 3 years ago
parent 4884358680
commit 5621cede80

@ -77,14 +77,16 @@ type Client struct {
AppSecret string
AccessKey string
OpName string
Debug bool
}
func NewClient(appKey string, AppSecret string, AccessKey string, OpName string) *Client {
func NewClient(appKey, AppSecret, AccessKey, OpName string, debug bool) *Client {
return &Client{
AppKey: appKey,
AppSecret: AppSecret,
AccessKey: AccessKey,
OpName: OpName,
Debug: debug,
}
}
@ -124,7 +126,9 @@ func (c *Client) Exec(r Requester) (interface{}, error) {
if err != nil {
return nil, err
}
if c.Debug{
fmt.Println(temp)
}
result := temp[r.GetRespName()]
response := r.GetRespObj()
if err = mapstructure.Decode(result, &response); err != nil {

Loading…
Cancel
Save