Export struct sliceValidateError to allow error casting and rename it as (#2777)

SliceValidationError

Co-authored-by: Emeric de Bernis <emeric.debernis@adevinta.com>
This commit is contained in:
edebernis
2021-11-21 14:45:03 +01:00
committed by GitHub
parent 6aee45608d
commit 57ede9c95a
3 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -6,10 +6,10 @@ import (
"testing"
)
func BenchmarkSliceValidateError(b *testing.B) {
func BenchmarkSliceValidationError(b *testing.B) {
const size int = 100
for i := 0; i < b.N; i++ {
e := make(sliceValidateError, size)
e := make(SliceValidationError, size)
for j := 0; j < size; j++ {
e[j] = errors.New(strconv.Itoa(j))
}