diff --git a/CHANGELOG b/CHANGELOG index 90ef2aa..3f83938 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,13 @@ # CHANGELOG +- v1.2.1 + - upgrade deps + +- v1.2.0 + - [BREAK] change `Store.Locate`/`Trie[T].Locate`/`Trie[T].Query` prototypes + - support url var matching - "/:id/", "/*filepath" + - upgrade deps + - v1.1.3 - security patch - upgrade deps diff --git a/README.md b/README.md index e31e2f8..1bbf39f 100644 --- a/README.md +++ b/README.md @@ -97,10 +97,18 @@ To see the recently changes at [CHANGELOG](https://github.com/hedzr/store/blob/m > Since v1.1.0, unexported struct ptr (*storeS) removed from `Store` API. > > These apis changed to: +> > - `Clone() (newStore Store)` > - `Dup() (newStore Store)` > - `WithPrefix(prefix ...string) (newStore Store)` > - `WithPrefixReplaced(newPrefix ...string) (newStore Store)` +> +> Since v1.2.0, the prototypes of `Locate`/`Query` are changed. +> +> - an extra `kvpair` will be returned if there is `:ident` in trie path and matched ok. +> - support these url var matching: "/:id/", "/*filepath" +> +> For example, matching `/hello/bob` on a router path pattern `/hello/:name` will get `kvpair = {"name":"bob"}`, and `/search/any/thing/here` on pattern `/search/*keywords` will get `kvpair = {"keywords":"any/thing/here"}`. ## More Features diff --git a/doc.go b/doc.go index 3d0fff1..0821ac5 100644 --- a/doc.go +++ b/doc.go @@ -109,4 +109,4 @@ // - https://github.com/hedzr/store package store -const Version = "v1.1.3" // Version of libs.store +const Version = "v1.2.1" // Version of libs.store