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

     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 lostcancel defines an Analyzer that checks for failure to
     6  // call a context cancellation function.
     7  //
     8  // # Analyzer lostcancel
     9  //
    10  // lostcancel: check cancel func returned by context.WithCancel is called
    11  //
    12  // The cancellation function returned by context.WithCancel, WithTimeout,
    13  // and WithDeadline must be called or the new context will remain live
    14  // until its parent context is cancelled.
    15  // (The background context is never cancelled.)
    16  package lostcancel
    17  

View as plain text