From f7258b211d2eab96a43600ece95d591f3973ae69 Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Fri, 27 Mar 2026 15:18:20 -0400 Subject: internal/api: add support for examples renderDoc now includes examples. It has an option to omit examples, if we decide to omit them in order to reduce the context load. Change-Id: Ieaa411fe09b439f51aac7d49195cd5791a20d0d8 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/761000 LUCI-TryBot-Result: Go LUCI Reviewed-by: Hyang-Ah Hana Kim Reviewed-by: Ethan Lee TryBot-Bypass: Jonathan Amsterdam --- internal/api/testdata/examples.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 internal/api/testdata/examples.go (limited to 'internal/api/testdata/examples.go') diff --git a/internal/api/testdata/examples.go b/internal/api/testdata/examples.go new file mode 100644 index 00000000..93baaa17 --- /dev/null +++ b/internal/api/testdata/examples.go @@ -0,0 +1,14 @@ +// Copyright 2026 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 examples + +// F is a function. +func F() {} + +// T is a type. +type T struct{} + +// M is a method. +func (T) M() {} -- cgit v1.3