excerptForDebug truncates s for slog.Debug payloads. Keeps fallback log lines compact even when statement text runs long.
(s string, maxRunes int)
| 188 | // excerptForDebug truncates s for slog.Debug payloads. Keeps fallback log |
| 189 | // lines compact even when statement text runs long. |
| 190 | func excerptForDebug(s string, maxRunes int) string { |
| 191 | if len(s) <= maxRunes { |
| 192 | return s |
| 193 | } |
| 194 | return s[:maxRunes] + "..." |
| 195 | } |
no outgoing calls
no test coverage detected