Debian Codegraph @

go/analysis/internal/checker/testdata/json.txt

raw
1 # Test basic JSON output.
2
3 # File slashes assume non-Windows.
4 skip GOOS=windows
5
6 checker -rename -json example.com/p
7 exit 0
8
9 -- go.mod --
10 module example.com
11 go 1.22
12
13 -- p/p.go --
14 package p
15
16 func f(bar int) {}
17
18 -- stdout --
19 {
20 "example.com/p": {
21 "rename": [
22 {
23 "posn": "/TMP/p/p.go:3:8",
24 "end": "/TMP/p/p.go:3:11",
25 "message": "renaming \"bar\" to \"baz\"",
26 "suggested_fixes": [
27 {
28 "message": "renaming \"bar\" to \"baz\"",
29 "edits": [
30 {
31 "filename": "/TMP/p/p.go",
32 "start": 18,
33 "end": 21,
34 "new": "baz"
35 }
36 ]
37 }
38 ]
39 }
40 ]
41 }
42 }
43