fix version overide

This commit is contained in:
waggertron 2020-09-30 08:27:05 -07:00
parent 773501d92c
commit 13e59705d4
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ func (r Router) Invoke(ctx context.Context, payload []byte) ([]byte, error) {
for param, value := range req.PathParameters { for param, value := range req.PathParameters {
r := regexp.MustCompile(fmt.Sprintf("/(%s)(/|$)", value)) r := regexp.MustCompile(fmt.Sprintf("/(%s)(/|$)", value))
path = r.ReplaceAllStringFunc(path, func(m string) string { path = r.ReplaceAllStringFunc(path, func(m string) string {
return strings.Replace(m, value, fmt.Sprintf("{%s}", param), -1) return strings.Replace(m, value, fmt.Sprintf("{%s}", param), 1)
}) })
} }