Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported path parameters with root / prefix #79

Closed
cnp96 opened this issue Mar 18, 2020 · 1 comment
Closed

Unsupported path parameters with root / prefix #79

cnp96 opened this issue Mar 18, 2020 · 1 comment

Comments

@cnp96
Copy link

cnp96 commented Mar 18, 2020

These are the routes I need:

  1. GET /:code
  2. POST /shorten
  3. POST /expand

However, I get the following error:

panic: 'shorten' in new path '/shorten' conflicts with existing wildcard ':path' in existing prefix '/:path'

goroutine 1 [running]:
github.com/fasthttp/router.(*node).addRoute(0xc0000b0550, 0x16f28bc, 0x8, 0xc00020b800)
	~/go/pkg/mod/github.com/fasthttp/router@v0.6.1/tree.go:172 +0x352
github.com/fasthttp/router.(*Router).Handle(0xc0000acc00, 0x16f24fc, 0x7, 0x16f28bc, 0x8, 0xc00020b800)
	~/go/pkg/mod/github.com/fasthttp/router@v0.6.1/router.go:285 +0x297
github.com/savsgio/atreugo/v10.(*Router).init(0xc0000ca790)
	~/go/pkg/mod/github.com/savsgio/atreugo/v10@v10.4.1/router.go:98 +0x3fe
github.com/savsgio/atreugo/v10.(*Atreugo).Serve(0xc0000ed7c0, 0x186e1a0, 0xc0000a76c0, 0x0, 0x0)
	~/go/pkg/mod/github.com/savsgio/atreugo/v10@v10.4.1/atreugo.go:173 +0x8d
github.com/savsgio/atreugo/v10.(*Atreugo).ListenAndServe(0xc0000ed7c0, 0x186e420, 0xc0000a76a0)
	~/go/pkg/mod/github.com/savsgio/atreugo/v10@v10.4.1/atreugo.go:250 +0x7c
main.main()
	$MY_PROJECT_PATH/shortener/app/main.go:50 +0x509
exit status 2
@savsgio
Copy link
Owner

savsgio commented Mar 19, 2020

Hi @cnp96,

I've been fixed it after fixed on router package in version v0.7.0.
I will release a new version soon.

Thanks.

@savsgio savsgio closed this as completed Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants