GX3004: duplicate route pattern
Two route types have the same method and pattern.
Cause
Two route types have the same method and pattern. The router can send a request to one of them only.
Example
package route
import "github.com/alternayte/gx"
type Home struct {
gx.Route `GET /shop`
}
type List struct {
gx.Route `GET /shop`
}gx check reports:
shop/route/route.go:9:6: GX3004: pattern "GET /shop" is already used by "Home"Fix
- Change the pattern of one route type.
- Or remove one of the two types.