examples/keyboard: Add example tags

This commit is contained in:
Hajime Hoshi 2016-10-16 01:02:01 +09:00
parent 237e84d0ea
commit 908d8aa9f2
3 changed files with 12 additions and 6 deletions

View File

@ -154,7 +154,7 @@ func outputKeyboardImage() (map[string]image.Rectangle, error) {
palettedImg := image.NewPaletted(img.Bounds(), palette)
draw.Draw(palettedImg, palettedImg.Bounds(), img, image.ZP, draw.Src)
f, err := os.Create("_resources/images/keyboard/keyboard.png")
f, err := os.Create("../../_resources/images/keyboard/keyboard.png")
if err != nil {
return nil, err
}
@ -167,7 +167,9 @@ func outputKeyboardImage() (map[string]image.Rectangle, error) {
const keyRectTmpl = `{{.License}}
// DO NOT EDIT: This file is auto-generated by genkeys.go.
// DO NOT EDIT: This file is auto-generated by gen.go.
// +build example
package keyboard
@ -191,7 +193,7 @@ func outputKeyRectsGo(k map[string]image.Rectangle) error {
if err != nil {
return err
}
path := "keyboard/keyboard/keyrects.go"
path := "keyrects.go"
f, err := os.Create(path)
if err != nil {

View File

@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:generate go run keyboard/keyboard/gen.go
// +build example
//go:generate go run -tags=example gen.go
//go:generate gofmt -s -w .
package example
package keyboard

View File

@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// DO NOT EDIT: This file is auto-generated by genkeys.go.
// DO NOT EDIT: This file is auto-generated by gen.go.
// +build example
package keyboard