ArgResults should either implement the Map interface or make the options Map accessible #12771
Labels
area-pkg
Used for miscellaneous pkg/ packages not associated with specific area- teams.
type-enhancement
A request for a change that isn't a bug
This issue was originally filed by googlegroups...@kaioa.com
Right now, the options Map is private. ArgResults defines the [] operator to allow Map-like read-only access.
This works fine. However, you end up passing the ArgResults object around, because pulling the values out of that ArgsResult object is quite a bit of work. This is inconvenient when it comes to testing, because creating an ArgResults object is more work than creating a Map.
Also, this kind of dependency is really weird. Whatever that function does, it probably has very little to do with argument parsing. It shouldn't take an ArgsResult object as argument.
The text was updated successfully, but these errors were encountered: