Source file src/cmd/vendor/golang.org/x/tools/go/analysis/passes/atomic/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 atomic defines an Analyzer that checks for common mistakes
     6  // using the sync/atomic package.
     7  //
     8  // # Analyzer atomic
     9  //
    10  // atomic: check for common mistakes using the sync/atomic package
    11  //
    12  // The atomic checker looks for assignment statements of the form:
    13  //
    14  //	x = atomic.AddUint64(&x, 1)
    15  //
    16  // which are not atomic.
    17  package atomic
    18  

View as plain text