golang.org/x/tools/gopls@v0.15.3/internal/test/marker/testdata/codeaction/inline.txt (about)

     1  This is a minimal test of the refactor.inline code action, without resolve support.
     2  See inline_resolve.txt for same test with resolve support.
     3  
     4  -- go.mod --
     5  module example.com/codeaction
     6  go 1.18
     7  
     8  -- a/a.go --
     9  package a
    10  
    11  func _() {
    12  	println(add(1, 2)) //@codeaction("add", ")", "refactor.inline", inline)
    13  }
    14  
    15  func add(x, y int) int { return x + y }
    16  
    17  -- @inline/a/a.go --
    18  package a
    19  
    20  func _() {
    21  	println(1 + 2) //@codeaction("add", ")", "refactor.inline", inline)
    22  }
    23  
    24  func add(x, y int) int { return x + y }