| 1 |
This test demonstrates support for "hoverKind": "Structured". |
| 2 |
|
| 3 |
Its size expectations assume a 64-bit machine. |
| 4 |
|
| 5 |
-- flags -- |
| 6 |
-skip_goarch=386,arm |
| 7 |
|
| 8 |
-- go.mod -- |
| 9 |
module example.com/p |
| 10 |
|
| 11 |
go 1.18 |
| 12 |
|
| 13 |
-- settings.json -- |
| 14 |
{ |
| 15 |
"hoverKind": "Structured" |
| 16 |
} |
| 17 |
-- p.go -- |
| 18 |
package p |
| 19 |
|
| 20 |
// MyType is a type. |
| 21 |
type MyType struct { //@ hover("MyType", "MyType", MyType) |
| 22 |
F int // a field |
| 23 |
S string // a string field |
| 24 |
} |
| 25 |
|
| 26 |
// MyFunc is a function. |
| 27 |
func MyFunc(i int) string { //@ hover("MyFunc", "MyFunc", MyFunc) |
| 28 |
return "" |
| 29 |
} |
| 30 |
-- @MyFunc -- |
| 31 |
{"synopsis":"MyFunc is a function.","fullDocumentation":"MyFunc is a function.\n","signature":"func MyFunc(i int) string","singleLine":"func MyFunc(i int) string","symbolName":"p.MyFunc","linkPath":"example.com/p","linkAnchor":"MyFunc"} |
| 32 |
-- @MyType -- |
| 33 |
{"synopsis":"MyType is a type.","fullDocumentation":"MyType is a type.\n","signature":"type MyType struct { // size=24 (0x18)\n\tF int // a field\n\tS string // a string field\n}\n","singleLine":"type MyType struct{F int; S string}","symbolName":"p.MyType","linkPath":"example.com/p","linkAnchor":"MyType"} |