forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apacheGH-36696: [Go] Improve the MapOf and ListOf helpers (apache#36697)
### Rationale for this change The aim is to improve the MapOf and ListOf helper functions without breaking anything. I have added a `ListOfWithName` which matches the `MapOf` function in that it takes a name, rather than deriving it from the elements name, which should actually be `element`. This just seems clearer to me as an interface, and makes construction a bit more obvious. ### What changes are included in this PR? * Removed references to panics I can't find * Updated error messages for list and map to be clearer with validation errors * Added a ListOfWithName to provide a clearer matching method to MapOf which takes a name Closes apache#36696 ### Are these changes tested? Yes, I added a test for the new `ListOfWithName` function. ### Are there any user-facing changes? * Closes: apache#36696 Authored-by: Mark Wolfe <[email protected]> Signed-off-by: Matt Topol <[email protected]>
- Loading branch information
1 parent
f56d0a9
commit 5655181
Showing
2 changed files
with
60 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters