Debian Codegraph @

gopls/internal/analysis/unusedvariable/testdata/src/decl/a.go.golden

raw
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 `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
24 panic(d)
25 }