Fix lint errors (#2547)

tokarchuk/v1.17
Ethan Koenig 7 years ago committed by Lauris BH
parent d155d0e665
commit 4cb9394a97
  1. 6
      models/gpg_key.go
  2. 6
      models/issue.go
  3. 5
      models/login_source.go
  4. 6
      models/migrations/v16.go
  5. 5
      models/migrations/v21.go
  6. 6
      models/org.go
  7. 6
      models/ssh_key.go
  8. 5
      modules/lfs/content_store.go
  9. 5
      modules/log/file.go

@ -282,11 +282,7 @@ func DeleteGPGKey(doer *User, id int64) (err error) {
return err return err
} }
if err = sess.Commit(); err != nil { return sess.Commit()
return err
}
return nil
} }
// CommitVerification represents a commit validation of signature // CommitVerification represents a commit validation of signature

@ -571,11 +571,7 @@ func (issue *Issue) ReadBy(userID int64) error {
return err return err
} }
if err := setNotificationStatusReadIfUnread(x, userID, issue.ID); err != nil { return setNotificationStatusReadIfUnread(x, userID, issue.ID)
return err
}
return nil
} }
func updateIssueCols(e Engine, issue *Issue, cols ...string) error { func updateIssueCols(e Engine, issue *Issue, cols ...string) error {

@ -498,10 +498,7 @@ func SMTPAuth(a smtp.Auth, cfg *SMTPConfig) error {
} }
if ok, _ := c.Extension("AUTH"); ok { if ok, _ := c.Extension("AUTH"); ok {
if err = c.Auth(a); err != nil { return c.Auth(a)
return err
}
return nil
} }
return ErrUnsupportedLoginType return ErrUnsupportedLoginType
} }

@ -119,9 +119,5 @@ func addUnitsToTables(x *xorm.Engine) error {
} }
} }
if err := sess.Commit(); err != nil { return sess.Commit()
return err
}
return nil
} }

@ -51,8 +51,5 @@ func useNewPublickeyFormat(x *xorm.Engine) error {
} }
f.Close() f.Close()
if err = os.Rename(tmpPath, fpath); err != nil { return os.Rename(tmpPath, fpath)
return err
}
return nil
} }

@ -235,11 +235,7 @@ func DeleteOrganization(org *User) (err error) {
} }
} }
if err = sess.Commit(); err != nil { return sess.Commit()
return err
}
return nil
} }
func deleteOrg(e *xorm.Session, u *User) error { func deleteOrg(e *xorm.Session, u *User) error {

@ -599,11 +599,7 @@ func RewriteAllPublicKeys() error {
defer f.Close() defer f.Close()
} }
if err = os.Rename(tmpPath, fPath); err != nil { return os.Rename(tmpPath, fPath)
return err
}
return nil
} }
// ________ .__ ____ __. // ________ .__ ____ __.

@ -70,10 +70,7 @@ func (s *ContentStore) Put(meta *models.LFSMetaObject, r io.Reader) error {
return errHashMismatch return errHashMismatch
} }
if err := os.Rename(tmpPath, path); err != nil { return os.Rename(tmpPath, path)
return err
}
return nil
} }
// Exists returns true if the object exists in the content store. // Exists returns true if the object exists in the content store.

@ -110,10 +110,7 @@ func (w *FileLogWriter) StartLogger() error {
return err return err
} }
w.mw.SetFd(fd) w.mw.SetFd(fd)
if err = w.initFd(); err != nil { return w.initFd()
return err
}
return nil
} }
func (w *FileLogWriter) docheck(size int) { func (w *FileLogWriter) docheck(size int) {

Loading…
Cancel
Save