Skip to content

Instantly share code, notes, and snippets.

@meirish
Created September 3, 2012 02:18
Show Gist options
  • Save meirish/3606287 to your computer and use it in GitHub Desktop.
Save meirish/3606287 to your computer and use it in GitHub Desktop.
package main
import (
"code.google.com/p/go-tour/pic"
)
func Pic(dx, dy int) [][]uint8 {
result := make([][]uint8, dy)
for x := 0; x < dy; x++ {
result[x] = make([]uint8, dx)
for y := 0; y < dx; y++ {
result[x][y] = uint8(x^y)
}
}
return result
}
func main() {
pic.Show(Pic)
}
@meirish
Copy link
Author

meirish commented Sep 3, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment