github.com/v2fly/tools@v0.100.0/internal/lsp/testdata/badstmt/badstmt.go.in (about) 1 package badstmt 2 3 import ( 4 "golang.org/x/tools/internal/lsp/foo" 5 ) 6 7 func _() { 8 defer foo.F //@complete(" //", Foo),diag(" //", "syntax", "function must be invoked in defer statement", "error") 9 y := 1 10 defer foo.F //@complete(" //", Foo) 11 } 12 13 func _() { 14 switch true { 15 case true: 16 go foo.F //@complete(" //", Foo) 17 } 18 } 19 20 func _() { 21 defer func() { 22 foo.F //@complete(" //", Foo),snippet(" //", Foo, "Foo()", "Foo()") 23 24 foo. //@rank(" //", Foo) 25 } 26 }