mcp/Resource: Refactor URI Template Matching with uritemplate Library (#100)
1. Replaced the `uriTemplateToRegexp` function with the use of [yosida95/uritemplate](https://github.com/yosida95/uritemplate) to handle URI template matching as per the request. 2. Updated the relevant test cases to verify the new implementation and fixed an invalid URI template (`"file:///{}/{a}/{b}"`) that doesn't conform to RFC 6570 due to an empty `{}` expression. 3. Updated `go.mod` and `go.sum` to reflect the new dependency. Fixes #11.
This commit is contained in:
parent
cdf34cc9da
commit
fbff31af14
1 changed files with 10 additions and 68 deletions
1
go.mod
1
go.mod
|
|
@ -4,5 +4,6 @@ go 1.23.0
|
|||
|
||||
require (
|
||||
github.com/google/go-cmp v0.7.0
|
||||
github.com/yosida95/uritemplate/v3 v3.0.2
|
||||
golang.org/x/tools v0.34.0
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue