Fix for golangci-lint warning

Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
This commit is contained in:
Tyler Reid 2021-06-16 09:38:18 -05:00
parent 6ada9a634d
commit 756cddad9c

View File

@ -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
}