examples: Misspelling (//go:generated -> //go:generate)

This commit is contained in:
Hajime Hoshi 2021-09-20 15:22:46 +09:00
parent 537bdb29f8
commit 07c8cb0e23
32 changed files with 64 additions and 64 deletions

View File

@ -70,8 +70,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
}
func main() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))

View File

@ -36,8 +36,8 @@ const (
var ebitenImage *ebiten.Image
func init() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))

View File

@ -46,8 +46,8 @@ var (
)
func init() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))

View File

@ -79,8 +79,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
}
func main() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))

View File

@ -65,8 +65,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
}
func main() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Runner_png))

View File

@ -122,8 +122,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
}
func main() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))

View File

@ -70,8 +70,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
}
func main() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.FiveYears_jpg))

View File

@ -53,8 +53,8 @@ var (
)
func init() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Tiles_png))

View File

@ -73,8 +73,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
}
func main() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))

View File

@ -89,8 +89,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
}
func main() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))

View File

@ -192,8 +192,8 @@ type Game struct {
var ebitenImage *ebiten.Image
func init() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))

View File

@ -66,8 +66,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
}
func main() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))

View File

@ -91,8 +91,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
}
func main() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))

View File

@ -43,8 +43,8 @@ var (
)
func init() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))

View File

@ -139,8 +139,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
}
func main() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))

View File

@ -65,8 +65,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
}
func main() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))

View File

@ -39,8 +39,8 @@ var (
)
func init() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Tile_png))

View File

@ -43,8 +43,8 @@ var (
)
func init() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img1, _, err := image.Decode(bytes.NewReader(rmascot.Out01_png))

View File

@ -42,8 +42,8 @@ var (
)
func init() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))

View File

@ -98,8 +98,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
}
func main() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))

View File

@ -39,8 +39,8 @@ var (
)
func init() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))

View File

@ -46,8 +46,8 @@ const (
var smokeImage *ebiten.Image
func init() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Smoke_png))

View File

@ -70,8 +70,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
}
func main() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))

View File

@ -47,8 +47,8 @@ var (
)
func init() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Tile_png))

View File

@ -70,8 +70,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
}
func main() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))

View File

@ -42,8 +42,8 @@ var (
)
func init() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(resources.Gopher_png))

View File

@ -42,8 +42,8 @@ var (
)
func init() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))

View File

@ -44,8 +44,8 @@ var (
)
func init() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Ebiten_png))

View File

@ -44,8 +44,8 @@ var (
)
func init() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Tiles_png))

View File

@ -229,8 +229,8 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
}
func main() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))

View File

@ -46,8 +46,8 @@ var (
)
func init() {
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.UI_png))

View File

@ -377,8 +377,8 @@ func main() {
w, h := ebiten.ScreenSizeInFullscreen()
fmt.Printf("Screen size in fullscreen: %d, %d\n", w, h)
// Decode an image from a byte slice.
// Now this image file's byte slice is generated with //go:generated for Go 1.15 or older.
// Decode an image from the image file's byte slice.
// Now the byte slice is generated with //go:generate for Go 1.15 or older.
// If you use Go 1.16 or newer, it is strongly recommended to use //go:embed to embed the image file.
// See https://pkg.go.dev/embed for more details.
img, _, err := image.Decode(bytes.NewReader(images.Gophers_jpg))