Skip to content

Commit

Permalink
fix error message to print the unexpected rune
Browse files Browse the repository at this point in the history
  • Loading branch information
injeniero authored and jackc committed Dec 2, 2023
1 parent 89d699c commit 4678e69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pgtype/array.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
2 changes: 1 addition & 1 deletion pgtype/multirange.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4678e69

Please sign in to comment.