New features
-
Map.Deleteremoves values by selector. It takes one or more selectors in the same dot and bracket notation asGetandSet, removes the map keys or slice elements they point to, and returns the map so calls can be chained:m.Delete("books[1].chapters[2].title", "draft")
Selectors run in order, so after a slice element is removed, later selectors see the shifted indexes. Missing paths and out-of-range indexes are ignored. Removing a slice element builds a new slice of the same type (
[]stringstays[]string) and leaves the original backing array untouched. Maps along the path are modified in place. (#174)
What's Changed
New Contributors
Full Changelog: v0.7.0...v0.8.0