gopls/internal/test/marker/testdata/definition/standalone_issue64557.txt
raw| 1 | This test checks that we can load standalone files that use cgo. |
| 2 | |
| 3 | -- flags -- |
| 4 | -cgo |
| 5 | |
| 6 | -- go.mod -- |
| 7 | module example.com |
| 8 | |
| 9 | -- main.go -- |
| 10 | //go:build ignore |
| 11 | |
| 12 | package main |
| 13 | |
| 14 | import ( |
| 15 | "C" |
| 16 | |
| 17 | "example.com/a" |
| 18 | ) |
| 19 | |
| 20 | func F() {} //@loc(F, "F") |
| 21 | |
| 22 | func main() { |
| 23 | F() //@def("F", F) |
| 24 | println(a.A) //@def("A", A) |
| 25 | } |
| 26 | |
| 27 | -- a/a.go -- |
| 28 | package a |
| 29 | |
| 30 | const A = 0 //@loc(A, "A") |