GX3005: route package contents
A route package holds code other than route types.
Cause
A route package holds code other than route types. Each slice imports the route packages of the other slices, so a route package must not import a slice.
Example
package route
import "github.com/alternayte/gx"
type Home struct {
gx.Route `GET /shop`
}
// Title is not a route type.
func Title() string { return "Shop" }gx lint reports:
shop/route/route.go:10:1: GX3005: route package holds a func; only route types are allowedFix
- Move the function or the variable into the slice package.
- Keep only route types and their
Rulesmethods in theroutepackage.