From 29f840d1f1f8fc1e7bce26b8a6445af2c0ac4fec Mon Sep 17 00:00:00 2001 From: Adam Shannon Date: Thu, 11 Jan 2024 15:06:31 -0600 Subject: [PATCH] fix: make ValidateLength error more clear --- pkg/rtp/restrictions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/rtp/restrictions.go b/pkg/rtp/restrictions.go index a5cabd5..8bfa7b1 100644 --- a/pkg/rtp/restrictions.go +++ b/pkg/rtp/restrictions.go @@ -61,7 +61,7 @@ func ValidateEnumeration(value string, enumeration ...string) error { func ValidateLength(value string, length int) error { var strLength = utf8.RuneCountInString(value) if strLength != length { - return fmt.Errorf("%s fails validation with length %v != required length %v", value, strLength, length) + return fmt.Errorf("%s fails validation with length %v, length %v required", value, strLength, length) } return nil }