src/go/doc/testdata/pkgdoc/doc.go
raw| 1 | // Copyright 2022 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package pkgdoc |
| 6 | |
| 7 | import ( |
| 8 | crand "crypto/rand" |
| 9 | "math/rand" |
| 10 | ) |
| 11 | |
| 12 | type T int |
| 13 | |
| 14 | type U int |
| 15 | |
| 16 | func (T) M() {} |
| 17 | |
| 18 | var _ = rand.Int |
| 19 | var _ = crand.Reader |
| 20 | |
| 21 | type G[T any] struct{ X T } |
| 22 | |
| 23 | func (g G[T]) M1() {} |
| 24 | func (g *G[T]) M2() {} |
| 25 | |
| 26 | type I interface { |
| 27 | F() |
| 28 | } |