box-o-sand/gotime/gotour-artifacts/exercise-slices/main.go
Dan Buch 44999623da Collapsing tree into more sane Go project layout
since I was in here looking at something unrelated...
2012-12-13 18:12:43 -05:00

21 lines
284 B
Go

package main
import (
"code.google.com/p/go-tour/pic"
)
func Pic(dx, dy int) [][]uint8 {
cols := make([][]uint8, dy)
for i := range cols {
cols[i] = make([]uint8, dx)
for j := range cols[i] {
cols[i][j] = uint8(j ^ i)
}
}
return cols
}
func main() {
pic.Show(Pic)
}