barakmich / go-nyet

More aggressive `go vet`
BSD 2-Clause "Simplified" License
89 stars 8 forks source link

`err` should not be allowed to go unused #6

Closed tamird closed 8 years ago

tamird commented 9 years ago
package main

import "os"

func main() {
    file, err := os.Open("notafile")
    err = file.Close()
}

Currently passes go-nyet, which it probably should not - not checking errors is Bad.