Last active
October 26, 2020 22:42
-
-
Save steph9009/f2a909c2039299f289fc56e6c1b97531 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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