From c67e4d98d212356ec0d9436a1edcbb6eb799f847 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Sun, 10 Apr 2016 15:05:36 +1000 Subject: [PATCH] Use an "example" build tag instead of "ignore". The golang-dev discussion is at https://groups.google.com/d/topic/golang-dev/qKpxZiNABcY/discussion --- example/capjoin/main.go | 5 +++-- example/drawer/main.go | 5 +++-- example/freetype/main.go | 5 +++-- example/gamma/main.go | 5 +++-- example/raster/main.go | 5 +++-- example/round/main.go | 5 +++-- example/truetype/main.go | 5 +++-- 7 files changed, 21 insertions(+), 14 deletions(-) diff --git a/example/capjoin/main.go b/example/capjoin/main.go index 13675c9..71f3356 100644 --- a/example/capjoin/main.go +++ b/example/capjoin/main.go @@ -3,10 +3,11 @@ // FreeType License or the GNU General Public License version 2 (or // any later version), both of which can be found in the LICENSE file. -// +build ignore +// +build example // // This build tag means that "go install github.com/golang/freetype/..." -// doesn't install this example program. Use "go run main.go" to run it. +// doesn't install this example program. Use "go run main.go" to run it or "go +// install -tags=example" to install it. package main diff --git a/example/drawer/main.go b/example/drawer/main.go index 4af981f..d26d066 100644 --- a/example/drawer/main.go +++ b/example/drawer/main.go @@ -3,10 +3,11 @@ // FreeType License or the GNU General Public License version 2 (or // any later version), both of which can be found in the LICENSE file. -// +build ignore +// +build example // // This build tag means that "go install github.com/golang/freetype/..." -// doesn't install this example program. Use "go run main.go" to run it. +// doesn't install this example program. Use "go run main.go" to run it or "go +// install -tags=example" to install it. package main diff --git a/example/freetype/main.go b/example/freetype/main.go index 21657a3..dfbde9a 100644 --- a/example/freetype/main.go +++ b/example/freetype/main.go @@ -3,10 +3,11 @@ // FreeType License or the GNU General Public License version 2 (or // any later version), both of which can be found in the LICENSE file. -// +build ignore +// +build example // // This build tag means that "go install github.com/golang/freetype/..." -// doesn't install this example program. Use "go run main.go" to run it. +// doesn't install this example program. Use "go run main.go" to run it or "go +// install -tags=example" to install it. package main diff --git a/example/gamma/main.go b/example/gamma/main.go index 778697f..cdd50bc 100644 --- a/example/gamma/main.go +++ b/example/gamma/main.go @@ -3,10 +3,11 @@ // FreeType License or the GNU General Public License version 2 (or // any later version), both of which can be found in the LICENSE file. -// +build ignore +// +build example // // This build tag means that "go install github.com/golang/freetype/..." -// doesn't install this example program. Use "go run main.go" to run it. +// doesn't install this example program. Use "go run main.go" to run it or "go +// install -tags=example" to install it. package main diff --git a/example/raster/main.go b/example/raster/main.go index ae9c57f..3e572e1 100644 --- a/example/raster/main.go +++ b/example/raster/main.go @@ -3,10 +3,11 @@ // FreeType License or the GNU General Public License version 2 (or // any later version), both of which can be found in the LICENSE file. -// +build ignore +// +build example // // This build tag means that "go install github.com/golang/freetype/..." -// doesn't install this example program. Use "go run main.go" to run it. +// doesn't install this example program. Use "go run main.go" to run it or "go +// install -tags=example" to install it. package main diff --git a/example/round/main.go b/example/round/main.go index 6c3012e..2920e83 100644 --- a/example/round/main.go +++ b/example/round/main.go @@ -3,10 +3,11 @@ // FreeType License or the GNU General Public License version 2 (or // any later version), both of which can be found in the LICENSE file. -// +build ignore +// +build example // // This build tag means that "go install github.com/golang/freetype/..." -// doesn't install this example program. Use "go run main.go" to run it. +// doesn't install this example program. Use "go run main.go" to run it or "go +// install -tags=example" to install it. // This program visualizes the quadratic approximation to the circle, used to // implement round joins when stroking paths. The approximation is used in the diff --git a/example/truetype/main.go b/example/truetype/main.go index 9f52cd1..e7db2d0 100644 --- a/example/truetype/main.go +++ b/example/truetype/main.go @@ -3,10 +3,11 @@ // FreeType License or the GNU General Public License version 2 (or // any later version), both of which can be found in the LICENSE file. -// +build ignore +// +build example // // This build tag means that "go install github.com/golang/freetype/..." -// doesn't install this example program. Use "go run main.go" to run it. +// doesn't install this example program. Use "go run main.go" to run it or "go +// install -tags=example" to install it. package main