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

     1  package pkg
     2  
     3  type t1 struct { //@ used("t1", true)
     4  	F1 int //@ used("F1", true)
     5  }
     6  
     7  type T2 struct { //@ used("T2", true)
     8  	F2 int //@ used("F2", true)
     9  }
    10  
    11  var v struct { //@ used("v", true)
    12  	T3 //@ used("T3", true)
    13  }
    14  
    15  type T3 struct{} //@ used("T3", true)
    16  
    17  func (T3) Foo() {} //@ used("Foo", true)
    18  
    19  func init() { //@ used("init", true)
    20  	v.Foo()
    21  }
    22  
    23  func init() { //@ used("init", true)
    24  	_ = t1{}
    25  }
    26  
    27  type codeResponse struct { //@ used("codeResponse", true)
    28  	Tree *codeNode `json:"tree"` //@ used("Tree", true)
    29  }
    30  
    31  type codeNode struct { //@ used("codeNode", true)
    32  }
    33  
    34  func init() { //@ used("init", true)
    35  	_ = codeResponse{}
    36  }