Source file src/cmd/vendor/golang.org/x/tools/go/analysis/passes/assign/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 assign defines an Analyzer that detects useless assignments.
     6  //
     7  // # Analyzer assign
     8  //
     9  // assign: check for useless assignments
    10  //
    11  // This checker reports assignments of the form x = x or a[i] = a[i].
    12  // These are almost always useless, and even when they aren't they are
    13  // usually a mistake.
    14  package assign
    15  

View as plain text