git.lucas.co / go_mono
git clone https://git.lucas.co/go_mono.git

commitaa35264064ba97668fab8736503e428bde0b656c
parent22fd5b5408
authorDmitri Shuralyov <[email protected]>
date2018-11-08 18:43
font/sfnt: rename ExampleRasterizeGlyph to Example_rasterizeGlyph

This change renames the example to follow correct naming convention,
as documented at https://godoc.org/testing#hdr-Examples. As a result,
it shows up in godoc.

This issue was caught and reported by vet:

	$ go vet golang.org/x/image/font/sfnt
	# golang.org/x/image/font/sfnt_test
	font/sfnt/example_test.go:19: ExampleRasterizeGlyph refers to unknown identifier: RasterizeGlyph

Fixes golang/go#28684

Change-Id: I2749c638c5f3ed15e4db0448bc7a5e2c12c056e5
Reviewed-on: https://go-review.googlesource.com/c/148576
Reviewed-by: Brad Fitzpatrick <[email protected]>

 font/sfnt/example_test.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/font/sfnt/example_test.go b/font/sfnt/example_test.go
index baddcfe..3e40a71 100644
--- a/font/sfnt/example_test.go
+++ b/font/sfnt/example_test.go
@@ -16,7 +16,7 @@ import (
 	"golang.org/x/image/vector"
 )
 
-func ExampleRasterizeGlyph() {
+func Example_rasterizeGlyph() {
 	const (
 		ppem    = 32
 		width   = 24