]> Cypherpunks repositories - gostls13.git/commit
go/doc: do not treat methods as test functions
authorRoger Peppe <rogpeppe@gmail.com>
Fri, 20 Jul 2018 10:31:39 +0000 (11:31 +0100)
committerAndrew Bonventre <andybons@golang.org>
Tue, 31 Jul 2018 16:11:48 +0000 (16:11 +0000)
commit1a5350e123e9ef8ce4fb27470e58a4bb58a445f0
tree888fa230da894865a6ae18774004d519c20cc307
parent5332b5e75acdd17c6d0afe84c014be8528765fe2
go/doc: do not treat methods as test functions

The example code was treating a method starting with Test
as a test function when considering whether to produce
a whole-file example or not. As a method can never be
a test function, this isn't correct.

Change-Id: Idd8ec9eaf0904af076e941d7fe7d967f6b7eef78
Reviewed-on: https://go-review.googlesource.com/125257
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/go/doc/example.go
src/go/doc/example_test.go