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

路由前缀一致导致的冲突问题 #1993

Closed
gitzhang opened this issue Jul 17, 2019 · 2 comments · Fixed by #2663
Closed

路由前缀一致导致的冲突问题 #1993

gitzhang opened this issue Jul 17, 2019 · 2 comments · Fixed by #2663

Comments

@gitzhang
Copy link

我的系统中出现了无法避免的路由前缀一致的情况,请问应该如何处理?
代码片段如下:

pakGroup := router.Group("/pak")
{
	terrainGroup := pakGroup.Group("/terrain")
	{
		terrainGroup.GET("/:layername/layer.json", layerjson)
		terrainGroup.GET("/:layername/:z/:x/:y&f", terrain)
	}
}

错误提示如下:

panic: wildcard route ':z' conflicts with existing children in path '/pak/terrain/:layername/:z/:x/:y&f'
@thinkerou
Copy link
Member

please see #388

@solomn1991
Copy link

这里问问题可以写中文吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants