...

Package sigchanyzer

import "cmd/vendor/golang.org/x/tools/go/analysis/passes/sigchanyzer"
Overview
Index

Overview ▾

Package sigchanyzer defines an Analyzer that detects misuse of unbuffered signal as argument to signal.Notify.

Analyzer sigchanyzer

sigchanyzer: check for unbuffered channel of os.Signal

This checker reports call expression of the form

signal.Notify(c <-chan os.Signal, sig ...os.Signal),

where c is an unbuffered channel, which can be at risk of missing the signal.

Package sigchanyzer defines an Analyzer that detects misuse of unbuffered signal as argument to signal.Notify.

Index ▾

Package files

doc.go sigchanyzer.go

Variables

Analyzer describes sigchanyzer analysis function detector.

var Analyzer = &analysis.Analyzer{
    Name:     "sigchanyzer",
    Doc:      analysisutil.MustExtractDoc(doc, "sigchanyzer"),
    URL:      "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/sigchanyzer",
    Requires: []*analysis.Analyzer{inspect.Analyzer},
    Run:      run,
}