fix version overide
This commit is contained in:
parent
773501d92c
commit
13e59705d4
|
@ -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)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue