Skip to content

Commit

Permalink
Merge branch 'release/v1.0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
bububa committed Mar 21, 2024
2 parents e0bf0d2 + 467af56 commit aac500e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/internal/debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,12 @@ func DecodeJSONHttpResponse(r io.Reader, v interface{}, debug bool) ([]byte, err
return nil, nil
}
bs := buf.Bytes()
buf.Reset()
if err := json.Indent(buf, bs, "", "\t"); err != nil {
debugBuf := util.NewBufferPool()
defer util.ReleaseBufferPool(debugBuf)
if err := json.Indent(debugBuf, bs, "", "\t"); err != nil {
return bs, err
}

log.Println(util.StringsJoin("[DEBUG] [API] http response body:\n", string(bs)))
log.Println(util.StringsJoin("[DEBUG] [API] http response body:\n", debugBuf.String()))
return nil, nil
}

0 comments on commit aac500e

Please sign in to comment.