package nilfunc

import "golang.org/x/tools/go/analysis/passes/nilfunc"

Package nilfunc defines an Analyzer that checks for useless comparisons against nil.

Index

Package Files

nilfunc.go

Constants

const Doc = `check for useless comparisons between functions and nil

A useless comparison is one like f == nil as opposed to f() == nil.`

Variables

var Analyzer = &analysis.Analyzer{
    Name:     "nilfunc",
    Doc:      Doc,
    Requires: []*analysis.Analyzer{inspect.Analyzer},
    Run:      run,
}

Package nilfunc imports 7 packages (graph).

Version v0.1.8 (latest) | Published Dec 2, 2021 | Platform: linux/amd64 | Updated 3 weeks ago

.
Tools for package owners.