golang.org/x/tools@v0.21.1-0.20240520172518-788d39e776b1/cmd/deadcode/testdata/jsonflag.txtar (about)

     1  # Very minimal test of -json flag.
     2  
     3  deadcode -json example.com/p
     4  
     5   want `"Path": "example.com/p",`
     6   want `"Name": "DeadFunc",`
     7   want `"Generated": false`
     8   want `"Line": 5,`
     9   want `"Col": 6`
    10  
    11  -- go.mod --
    12  module example.com
    13  go 1.18
    14  
    15  -- p/p.go --
    16  package main
    17  
    18  func main() {}
    19  
    20  func DeadFunc() {}
    21  
    22  type T int
    23  func (*T) DeadMethod() {}