title: Golang index out of range
body: <p>I'm trying to make a simply example of Golang. The example it's in te 36º page of the tour of golang.
  This is my code:</p>
  
  <pre><code>package main
  
  import "code.google.com/p/go-tour/pic"
  import "fmt"
  
  func Pic(dx, dy int) [][]uint8 {
      dx8 := uint8(dx)
  
      s1 := make ([][] uint8, dy)
      fmt.Printf("%d\n", len(s1), cap(s1))
  
      for i := range s1{
          fmt.Printf("%d\n",i)
          for j := range s1 {
              fmt.Printf("%d\n",j)
              s1[i][j] = dx8    
          }
      }
  
      return s1
  }
  
  func main() {
      pic.Show(Pic)
  }
  </code></pre>
  
  <p>And the error I got:</p>
  
  <pre><code>    256
  %!(EXTRA int=256)0
  0
  panic: runtime error: index out of range
  
  goroutine 1 [running]:
  panic(0x18b820, 0x1040a010)
      /usr/local/go/src/runtime/panic.go:464 +0x700
  main.Pic(0x100, 0x100, 0x0, 0x0, 0x0, 0x0)
      /tmp/sandbox716191956/main.go:17 +0x4e0
  code.google.com/p/go-tour/pic.Show(0x1d7988, 0x104000e0)
      /go/src/code.google.com/p/go-tour/pic/pic.go:20 +0x60
  main.main()
      /tmp/sandbox716191956/main.go:26 +0x20
  
  Program exited.
  </code></pre>
  
  <p>I only want to return a bidimensial slice which <code>Show</code> function uses.</p>