Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. type Transform [3][3]float64 // A 3x3 array, really an array of arrays.
  2. type LinesOfText [][]byte // A slice of byte slices.
  3.  
  4. //Slices within a 2D slice can have different lengths
  5.  
  6. text := LinesOfText{
  7. []byte("Now is the time"),
  8. []byte("for all good gophers"),
  9. []byte("to bring some fun to the party."),
  10. }
  11.  
  12. //iterate through it with the construct
  13.  
  14. for i := range text {
  15. fmt.Println(text[i])
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement