File: embed.txt

package info (click to toggle)
golang-golang-x-tools 1%3A0.25.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 22,724 kB
  • sloc: javascript: 2,027; asm: 1,645; sh: 166; yacc: 155; makefile: 49; ansic: 8
file content (57 lines) | stat: -rw-r--r-- 645 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
This test checks that hover reports accessible embedded fields
(after the doc comment  and before the accessible methods).

-- go.mod --
module example.com

go 1.18

-- q/q.go --
package q

type Q struct {
	One int
	two string
	q2[chan int]
}

type q2[T any] struct {
	Three *T
	four string
}

-- p.go --
package p

import "example.com/q"

// doc
type P struct {
	q.Q
}

func (P) m() {}

var p P //@hover("P", "P", P)

-- @P --
```go
type P struct {
	q.Q
}
```

doc


```go
// Embedded fields:
One   int       // through Q    
Three *chan int // through Q.q2 
```

```go
func (P) m()
```

[`p.P` on pkg.go.dev](https://pkg.go.dev/example.com#P)