]> Cypherpunks repositories - gostls13.git/commit
go/doc: remove brackets from receiver in example identifier
authorJonathan Amsterdam <jba@google.com>
Fri, 22 Apr 2022 17:18:15 +0000 (13:18 -0400)
committerJonathan Amsterdam <jba@google.com>
Tue, 10 May 2022 14:35:05 +0000 (14:35 +0000)
commitdd7d9b773f0c1319955eee0857e07dd411628e00
treeddc813eda0625f692ce9009fe0364bdeb3a305ec
parent59ef3a966b38cb2ac537d1be43f0b8fd2468ea70
go/doc: remove brackets from receiver in example identifier

When constructing a string for a method that will match an example
function's name, remove brackets from the receiver. This makes it
possible to write an example associated with a method of a generic
type.

Also, modify the test for classifying examples to check that all the
expected examples actually appear.

Fixes golang/go#52496.

Change-Id: Iebc5768f6cb91df9671dd701b97958fb8081f986
Reviewed-on: https://go-review.googlesource.com/c/go/+/401761
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
src/go/doc/example.go
src/go/doc/example_test.go