aboutsummaryrefslogtreecommitdiff
path: root/internal/api/testdata/text.golden
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/testdata/text.golden')
-rw-r--r--internal/api/testdata/text.golden71
1 files changed, 71 insertions, 0 deletions
diff --git a/internal/api/testdata/text.golden b/internal/api/testdata/text.golden
new file mode 100644
index 00000000..6497759c
--- /dev/null
+++ b/internal/api/testdata/text.golden
@@ -0,0 +1,71 @@
+package pkg
+
+Package pkg has every form of declaration.
+
+# Links
+
+ - pkgsite repo, https://go.googlesource.com/pkgsite
+ - Play with Go, https://play-with-go.dev
+
+CONSTANTS
+
+const (
+ X = 1
+ Y = 2
+)
+ Several constants.
+
+const C = 1
+ C is a shorthand for 1.
+
+VARIABLES
+
+var V = 2
+ V is a variable.
+
+FUNCTIONS
+
+func Add(x int) int
+ Add adds 1 to x.
+
+func F()
+ F is a function.
+
+TYPES
+
+type A int
+
+type B bool
+
+type I1 interface {
+ M1()
+}
+ I1 is an interface.
+
+type I2 interface {
+ I1
+ M2()
+}
+
+type S1 struct {
+ F int // field
+}
+ S1 is a struct.
+
+type S2 struct {
+ S1
+ G int
+}
+ S2 is another struct.
+
+type T int
+ T is a type.
+
+const CT T = 3
+ CT is a typed constant. They appear after their type.
+
+func TF() T
+ TF is a constructor for T.
+
+func (T) M()
+ M is a method of T. BUG(xxx): this verifies that notes are rendered.