| This test checks that links in hover obey GOPRIVATE. |
| |
| Requires go1.19+ for the new go/doc/comment package. |
| |
| -- flags -- |
| -min_go=go1.19 |
| |
| -- env -- |
| GOPRIVATE=mod.com |
| -- go.mod -- |
| module mod.com |
| -- p.go -- |
| package p |
| |
| // T should not be linked, as it is private. |
| type T struct{} //@hover("T", "T", T) |
| -- lib/lib.go -- |
| package lib |
| |
| // GOPRIVATE should also match nested packages. |
| type L struct{} //@hover("L", "L", L) |
| -- @L -- |
| ```go |
| type L struct{} |
| ``` |
| |
| GOPRIVATE should also match nested packages. |
| -- @T -- |
| ```go |
| type T struct{} |
| ``` |
| |
| T should not be linked, as it is private. |