8
Angry
15d

if err != nil {
if err.Error() == sql.ErrNoRows {
return nil, err
}
return nil, err
}

found me some choice, grade A Go code here.

Comments
  • 2
    I found something like this last week:

    if (user != null) {
    if (user == null) throw new IllegalArgumenrException(..);

    ....
    }
  • 2
    @Angry
    @just8littleBit

    Ok seriously, what the fuck?!
  • 1
    @metamourge i got him fired­čą│

    He was the worst engineer ever. Wouldn’t even call him an engineer. Maybe a untalented script kiddy.
    Although he was a senior with 20+years of experience.
  • 0
    I kinda like finding shadowed errs. I really wish Go would fix up the shadowing-var vet check again.

    errcheck does catch this, thankfully, but teams willing to integrate it are not usually the problem.

    @highlight
    val, err := something()
    another, err := other()
    if err != nil { return nil, err }
  • 1
  • 0
    ah yes, the good quality code, mmm
Add Comment