| 1 |
This test verifies the fix for golang/go#77329. |
| 2 |
Doc links to pointer types should be formatted correctly. |
| 3 |
|
| 4 |
-- go.mod -- |
| 5 |
module example.com |
| 6 |
|
| 7 |
go 1.21 |
| 8 |
|
| 9 |
-- a/a.go -- |
| 10 |
package a |
| 11 |
|
| 12 |
type Foo int |
| 13 |
|
| 14 |
type Baz string |
| 15 |
|
| 16 |
// Bar is a [*Foo] |
| 17 |
var Bar *Foo //@hover("Bar", "Bar", Bar) |
| 18 |
|
| 19 |
// Buzz is a [*Baz] with trailing space |
| 20 |
var Buzz *Baz //@hover("Buzz", "Buzz", Buzz) |
| 21 |
|
| 22 |
-- @Bar -- |
| 23 |
```go |
| 24 |
var Bar *Foo |
| 25 |
``` |
| 26 |
|
| 27 |
--- |
| 28 |
|
| 29 |
Bar is a [\*Foo](file://$WORKDIR/a/a.go#3,6) |
| 30 |
|
| 31 |
|
| 32 |
--- |
| 33 |
|
| 34 |
[`a.Bar` on pkg.go.dev](https://pkg.go.dev/example.com/a#Bar) |
| 35 |
-- @Buzz -- |
| 36 |
```go |
| 37 |
var Buzz *Baz |
| 38 |
``` |
| 39 |
|
| 40 |
--- |
| 41 |
|
| 42 |
Buzz is a [\*Baz](file://$WORKDIR/a/a.go#5,6) with trailing space |
| 43 |
|
| 44 |
|
| 45 |
--- |
| 46 |
|
| 47 |
[`a.Buzz` on pkg.go.dev](https://pkg.go.dev/example.com/a#Buzz) |