golang.org/x/tools/gopls@v0.15.3/internal/test/marker/testdata/hover/goprivate.txt (about) 1 This test checks that links in hover obey GOPRIVATE. 2 3 Requires go1.19+ for the new go/doc/comment package. 4 5 -- flags -- 6 -min_go=go1.19 7 8 -- env -- 9 GOPRIVATE=mod.com 10 -- go.mod -- 11 module mod.com 12 -- p.go -- 13 package p 14 15 // T should not be linked, as it is private. 16 type T struct{} //@hover("T", "T", T) 17 -- lib/lib.go -- 18 package lib 19 20 // GOPRIVATE should also match nested packages. 21 type L struct{} //@hover("L", "L", L) 22 -- @L -- 23 ```go 24 type L struct{} 25 ``` 26 27 GOPRIVATE should also match nested packages. 28 -- @T -- 29 ```go 30 type T struct{} 31 ``` 32 33 T should not be linked, as it is private.