/nilerr

Analyzer: nilerr checks returning nil when err is not nil

Primary LanguageGoMIT LicenseMIT

nilerr

godoc.org

nilerr finds codes which are returning nil and checking either error is not nil.

func f() error {
	err := do()
	if err != nil {
		return nil // miss
	}
}