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

conflicts with existing children in path #2289

Closed
nicolascamilo opened this issue Mar 22, 2020 · 1 comment · Fixed by #2663
Closed

conflicts with existing children in path #2289

nicolascamilo opened this issue Mar 22, 2020 · 1 comment · Fixed by #2663

Comments

@nicolascamilo
Copy link

nicolascamilo commented Mar 22, 2020

  • With issues:
    • Use the search tool before opening a new issue.
    • Please provide source code and commit sha if you found a bug.
    • Review existing issues and provide feedback or react to them.

Description

Receiving "panic: wildcard route ':id' conflicts with existing children in path '/users/:id'" error

How to reproduce

	user := r.Group("/users")
	{
		user.POST("/", ur.SignUp)
		user.POST("/login", l.Login)
		user.GET("/sendconfirmationemail/:userId", rc.SendConfirmationEmail)
		user.GET("/:id", lc.GetUserByUserId)
		user.GET("/confirmemail", rc.ConfirmEmail)
		user.GET("/resendconfirmationemail", rc.ResendEmailConfirmation)
		user.GET("/forgotusername", rc.ForgotUsername)
		user.GET("/sendpasswordreset", rc.SendPasswordReset)
		user.POST("/confirmpasswordreset", rc.ConfirmPasswordReset)
	}

Expectations

Somewthing working

Actual result

wildcard error

Environment

  • go version: 1.13.18
  • gin version (or commit ref): 1.5.0
  • operating system: windows
@appleboy
Copy link
Member

See #2016 (comment)

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