honnef.co/go/tools@v0.5.0-0.dev.0.20240520180541-dcae280a5e87/unused/testdata/src/example.com/elem/elem.go (about)

     1  // Test of field usage detection
     2  
     3  package pkg
     4  
     5  type t15 struct { //@ used("t15", true)
     6  	f151 int //@ used("f151", true)
     7  }
     8  type a2 [1]t15 //@ used("a2", true)
     9  
    10  type t16 struct{} //@ used("t16", true)
    11  type a3 [1][1]t16 //@ used("a3", true)
    12  
    13  func foo() { //@ used("foo", true)
    14  	_ = a2{0: {1}}
    15  	_ = a3{{{}}}
    16  }
    17  
    18  func init() { foo() } //@ used("init", true)