...

Source file src/cmd/vendor/golang.org/x/tools/go/analysis/passes/sigchanyzer/doc.go

Documentation: cmd/vendor/golang.org/x/tools/go/analysis/passes/sigchanyzer

     1  // Copyright 2023 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Package sigchanyzer defines an Analyzer that detects
     6  // misuse of unbuffered signal as argument to signal.Notify.
     7  //
     8  // # Analyzer sigchanyzer
     9  //
    10  // sigchanyzer: check for unbuffered channel of os.Signal
    11  //
    12  // This checker reports call expression of the form
    13  //
    14  //	signal.Notify(c <-chan os.Signal, sig ...os.Signal),
    15  //
    16  // where c is an unbuffered channel, which can be at risk of missing the signal.
    17  package sigchanyzer
    18  

View as plain text