fasthttp / router

Router implementation for fasthttp
BSD 3-Clause "New" or "Revised" License
463 stars 47 forks source link

hotfix(wildpath): set user empty value #46

Closed 1046102779 closed 3 years ago

1046102779 commented 3 years ago

router: /v1.0/publish/{topic:*} request uri: /v1.0/publish/

the topic field's value is empty string. why is "/" string ?

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 231


Totals Coverage Status
Change from base Build 227: 0.0%
Covered Lines: 969
Relevant Lines: 969

💛 - Coveralls
1046102779 commented 3 years ago

@savsgio please review pr

savsgio commented 3 years ago

Hi @1046102779,

Could you make a test to fulfill the 100% of coverage, please?

savsgio commented 3 years ago

Fix here too, please: https://github.com/fasthttp/router/blob/master/radix/tree.go#L89 , and will merge it.

ctx.SetUserValue(t.root.wildcard.paramKey, "")

Thanks

savsgio commented 3 years ago

@1046102779 ??

1046102779 commented 3 years ago

@1046102779 ??

i create a new pr