tools: golang.org/x/tools/go/analysis/passes/nilfunc Index | Files

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 6 packages (graph) and is imported by 9 packages. Updated 2019-07-15. Refresh now. Tools for package owners.