Debian Codegraph @

gopls/internal/test/marker/testdata/codeaction/inline.txt

raw
1 This is a minimal test of the refactor.inline.call code action, without resolve support.
2 See inline_resolve.txt for same test with resolve support.
3
4 -- capabilities.json --
5 {
6 "textDocument": {
7 "codeAction": {
8 "dataSupport": false,
9 "resolveSupport": {}
10 }
11 }
12 }
13
14 -- go.mod --
15 module example.com/codeaction
16 go 1.18
17
18 -- a/a.go --
19 package a
20
21 func _() {
22 println(add(1, 2)) //@codeaction("add", "refactor.inline.call", end=")", result=inline)
23 }
24
25 func add(x, y int) int { return x + y }
26
27 -- @inline/a/a.go --
28 package a
29
30 func _() {
31 println(1 + 2) //@codeaction("add", "refactor.inline.call", end=")", result=inline)
32 }
33
34 func add(x, y int) int { return x + y }
35