(detail string)
| 434 | const maxClassificationDetailRunes = 500 |
| 435 | |
| 436 | func normalizeClassificationDetail(detail string) string { |
| 437 | detail = strings.TrimSpace(detail) |
| 438 | if detail == "" { |
| 439 | return "" |
| 440 | } |
| 441 | runes := []rune(detail) |
| 442 | if len(runes) <= maxClassificationDetailRunes { |
| 443 | return detail |
| 444 | } |
| 445 | return string(runes[:maxClassificationDetailRunes-1]) + "…" |
| 446 | } |
no outgoing calls
no test coverage detected