boundText truncates s to MaxMessagePartTextLength runes, appending an ellipsis if truncation occurs.
(s string)
| 737 | // boundText truncates s to MaxMessagePartTextLength runes, appending |
| 738 | // an ellipsis if truncation occurs. |
| 739 | func boundText(s string) string { |
| 740 | return stringutil.Truncate(s, MaxMessagePartTextLength, stringutil.TruncateWithEllipsis) |
| 741 | } |
| 742 | |
| 743 | // safeMarshalJSON marshals value to JSON. On failure it returns a |
| 744 | // diagnostic error object rather than panicking, which is appropriate |
no outgoing calls