-
-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand meta tests; document some problems
Expand the meta tests, and also ensure they all get run so typos will be an error instead of being silently ignored. Replace some map[string]bool with map[string]struct{}, since that won't allocate anything. Super-small micro-optimisation, but I like it as it clarifies that the value is irrelevant and that we're just using the map as a set. Also document some problems with how MetaData and Key works: - The keys "a.b" (one quoted key with a dot) and a.b conflict. - Implicit keys aren't recorded, although IsDefined() does check for it, Type() returns nothing and they're not in the Keys() output. This really should be in there, and becomes important especially later if we use this for more things. - Array entries aren't easily accessible individually; they're recorded in Keys() multiple times with the same key name, and they all have the same type because the types is accessed as a map. This is an issue because not all array entries need to have the same type. The syntax for this should be different; e.g: array ArrayHash array[0].first_name String array[1].first_name String Or something to that effect. The problem is that this isn't really a backwards-compatible change: the Keys() return value will be quite different for arrays.
- Loading branch information
Showing
6 changed files
with
318 additions
and
50 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
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
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
Oops, something went wrong.