Back to godoc.org

Package nilfunc

v0.0.0-...-c9a70fc
Latest Go to latest

The latest major version is .

Published: Sep 16, 2020 | License: BSD-3-Clause | Module: golang.org/x/tools

Overview

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

Index

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,
}
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier