truncateBody caps body at maxBodySize and marks it as truncated.
(body []byte)
| 86 | |
| 87 | // truncateBody caps body at maxBodySize and marks it as truncated. |
| 88 | func truncateBody(body []byte) string { |
| 89 | if len(body) <= maxBodySize { |
| 90 | return string(body) |
| 91 | } |
| 92 | return string(body[:maxBodySize]) + "\n[truncated]" |
| 93 | } |
no outgoing calls
no test coverage detected