From 4678e69599f4bcef1a46de0570ba8ccc8224f006 Mon Sep 17 00:00:00 2001 From: Simon Paredes Date: Mon, 27 Nov 2023 18:54:28 -0300 Subject: [PATCH] fix error message to print the unexpected rune --- pgtype/array.go | 2 +- pgtype/multirange.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pgtype/array.go b/pgtype/array.go index 5ef613cb..06b824ad 100644 --- a/pgtype/array.go +++ b/pgtype/array.go @@ -169,7 +169,7 @@ func parseUntypedTextArray(src string) (*untypedTextArray, error) { } if r != '{' { - return nil, fmt.Errorf("invalid array, expected '{': %v", err) + return nil, fmt.Errorf("invalid array, expected '{' got %v", r) } implicitDimensions := []ArrayDimension{{LowerBound: 1, Length: 0}} diff --git a/pgtype/multirange.go b/pgtype/multirange.go index ff2aa4ff..e5763788 100644 --- a/pgtype/multirange.go +++ b/pgtype/multirange.go @@ -343,7 +343,7 @@ func parseUntypedTextMultirange(src []byte) ([]string, error) { } if r != '{' { - return nil, fmt.Errorf("invalid multirange, expected '{': %v", err) + return nil, fmt.Errorf("invalid multirange, expected '{' got %v", r) } parseValueLoop: