Showing 5 of 9 total issues
Method Auth.Authenticate
has 6 return statements (exceeds 4 allowed). Open
Open
func (a Auth) Authenticate(c echo.Context, user, pass string) (gorsk.AuthToken, error) {
u, err := a.udb.FindByUsername(a.db, user)
if err != nil {
return gorsk.AuthToken{}, err
}
Function New
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func New(db *pg.DB, udb UserDB, j TokenGenerator, sec Securer, rbac RBAC) Auth {
Method HTTP.change
has 5 return statements (exceeds 4 allowed). Open
Open
func (h *HTTP) change(c echo.Context) error {
id, err := strconv.Atoi(c.Param("id"))
if err != nil {
return gorsk.ErrBadRequest
}
Method Password.Change
has 5 return statements (exceeds 4 allowed). Open
Open
func (p Password) Change(c echo.Context, userID int, oldPass, newPass string) error {
if err := p.rbac.EnforceUser(c, userID); err != nil {
return err
}
Method HTTP.create
has 5 return statements (exceeds 4 allowed). Open
Open
func (h HTTP) create(c echo.Context) error {
r := new(createReq)
if err := c.Bind(r); err != nil {