blob: bf610ed35947295da7356d53d44f27d2db2bc1a5 [file] [log] [blame]
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package everydecl has every form of declaration known to dochtml.
// It is designed to test that the generated HTML has the right id and data-kind
// attributes.
//
//
// Links
//
// - pkgsite repo, https://go.googlesource.com/pkgsite
// - Play with Go, https://play-with-go.dev
//
package everydecl
// const
const C = 1
// var
var V = 2
// func
func F() {}
// type
type T int
// typeConstant
const CT T = 3
// typeVariable
var VT T
// typeFunc
func TF() T { return T(0) }
// method
// BUG(uid): this verifies that notes are rendered
func (T) M() {}
type S1 struct {
F int // field
}
type S2 struct {
S1 // embedded struct; should have an id
G int
}
type I1 interface {
M1()
}
type I2 interface {
I1 // embedded interface; should not have an id
M2()
}
type (
A int
B bool
)