Skip to content

Instantly share code, notes, and snippets.

@steph9009
Last active October 26, 2020 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steph9009/f2a909c2039299f289fc56e6c1b97531 to your computer and use it in GitHub Desktop.
Save steph9009/f2a909c2039299f289fc56e6c1b97531 to your computer and use it in GitHub Desktop.
package main
import (
//"fmt"
"golang.org/x/tour/pic"
)
func Pic(dx, dy int) [][]uint8 {
//fmt.Println(dx, dy)
s := make([][]uint8, dy)
for i := range s {
s[i] = make([]uint8, dx)
for j := range s[i] {
s[i][j] = uint8((j * i))
}
}
return s
}
func main() {
pic.Show(Pic)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment