mirror of
https://github.com/prometheus/alertmanager
synced 2024-12-28 17:12:13 +00:00
Fix for golangci-lint warning
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
This commit is contained in:
parent
6ada9a634d
commit
756cddad9c
@ -190,7 +190,7 @@ func validateAndTruncateMessage(message string) (string, bool, error) {
|
||||
if utf8.ValidString(message) {
|
||||
// if the message is larger than 256KB we have to truncate.
|
||||
if len(message) > 256*1024 {
|
||||
truncated := make([]byte, 256*1024, 256*1024)
|
||||
truncated := make([]byte, 256 * 1024)
|
||||
copy(truncated, message)
|
||||
return string(truncated), true, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user