aboutsummaryrefslogtreecommitdiff
path: root/gopls/internal/regtest/marker/testdata/hover/goprivate.txt
diff options
context:
space:
mode:
Diffstat (limited to 'gopls/internal/regtest/marker/testdata/hover/goprivate.txt')
-rw-r--r--gopls/internal/regtest/marker/testdata/hover/goprivate.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/gopls/internal/regtest/marker/testdata/hover/goprivate.txt b/gopls/internal/regtest/marker/testdata/hover/goprivate.txt
new file mode 100644
index 000000000..4c309ef38
--- /dev/null
+++ b/gopls/internal/regtest/marker/testdata/hover/goprivate.txt
@@ -0,0 +1,27 @@
+This test checks that links in hover obey GOPRIVATE.
+-- 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/hover.md --
+```go
+type L struct{}
+```
+
+GOPRIVATE should also match nested packages.
+-- @T/hover.md --
+```go
+type T struct{}
+```
+
+T should not be linked, as it is private.