mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
go/doc, godoc: regard lone examples as "whole file" examples
Fixes #2930. R=r, gri, rsc CC=golang-dev https://golang.org/cl/5657048
This commit is contained in:
parent
1c987a321f
commit
e11632ee00
4 changed files with 39 additions and 9 deletions
|
|
@ -64,6 +64,9 @@
|
|||
// func ExampleT_suffix() { ... }
|
||||
// func ExampleT_M_suffix() { ... }
|
||||
//
|
||||
// The entire test file is presented as the example when it contains a single
|
||||
// example function, at least one other function, type, variable, or constant
|
||||
// declaration, and no test or benchmark functions.
|
||||
package testing
|
||||
|
||||
import (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue