fix(agent): avoid predeclared lint on truncation helper
This commit is contained in:
parent
063174b793
commit
0f5b0e20e4
1 changed files with 2 additions and 2 deletions
|
|
@ -1275,8 +1275,8 @@ func formatMessageForSummary(msg providers.Message) []string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func truncateSummaryField(content string, max int) string {
|
func truncateSummaryField(content string, maxLen int) string {
|
||||||
truncated := utils.Truncate(content, max)
|
truncated := utils.Truncate(content, maxLen)
|
||||||
if utf8.RuneCountInString(truncated) < utf8.RuneCountInString(content) {
|
if utf8.RuneCountInString(truncated) < utf8.RuneCountInString(content) {
|
||||||
return truncated + " [TRUNCATED]"
|
return truncated + " [TRUNCATED]"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue