golang.org/x/tools/gopls@v0.15.3/internal/analysis/unusedvariable/testdata/src/decl/a.go.golden (about)

     1  // Copyright 2022 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 decl
     6  
     7  func a() {
     8  	var c bool // want `b.*declared (and|but) not used`
     9  	panic(c)
    10  
    11  	if 1 == 1 {
    12  	}
    13  }
    14  
    15  func b() {
    16  	// b is a variable
    17  }
    18  
    19  func c() {
    20  	var (
    21  		d string
    22  	)
    23  	panic(d)
    24  }