github.com/amarpal/go-tools@v0.0.0-20240422043104-40142f59f616/unused/testdata/src/example.com/increment/increment.go (about) 1 package pkg 2 3 type T struct { //@ used("T", true), used_test("T", true) 4 // Writing to fields uses them 5 f int //@ used("f", true), used_test("f", true) 6 } 7 8 // Not used, v is only written to 9 var v int //@ used("v", false), used_test("v", false) 10 11 func Foo() { //@ used("Foo", true), used_test("Foo", true) 12 var x T //@ used("x", true), used_test("x", true) 13 x.f++ 14 v++ 15 }