api/router: avoid unneeded loops and fix path match (#1594)

* api/router: avoid unneeded loops and fix path match

* if match found in google api path syntax, not try pcre loop
* if path is not ending via $ sign, append it to pcre to avoid matching other strings like
  /api/account/register can be matched to /api/account
* api: add tests and validations

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-04-29 15:23:10 +03:00
committed by GitHub
parent c7440274dd
commit d44adafca5
11 changed files with 645 additions and 107 deletions

View File

@@ -1,5 +1,5 @@
// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: github.com/micro/go-micro/runtime/service/proto/runtime.proto
// source: runtime/service/proto/runtime.proto
package go_micro_runtime