title: panic: runtime error: slice bounds out of range
body: <p>I'm following this tutorial: <a href="https://gobyexample.com/slices" rel="noreferrer">https://gobyexample.com/slices</a></p>
  
  <p>I was in the middle:</p>
  
  <pre><code>package main
  
  import "fmt"
  
  func main() {
  
      s := make([]string, 3)
      fmt.Println("emp:", s)
  
      s[0] = "a"
      s[1] = "b"
      s[2] = "c"
      fmt.Println("set:", s)
  
      c := make([]string, len(s))
      copy(c, s)
      fmt.Println("copy:", c)
  
      l := s[2:5]
      fmt.Println("sl1:", l)
  }
  </code></pre>
  
  <p>when I suddenly encountered this error:</p>
  
  <pre><code>alex@alex-K43U:~/golang$ go run hello.go
  emp: [  ]
  set: [a b c]
  copy: [a b c]
  panic: runtime error: slice bounds out of range
  
  goroutine 1 [running]:
  main.main()
      /home/alex/golang/hello.go:19 +0x2ba
  
  goroutine 2 [syscall]:
  created by runtime.main
      /usr/lib/go/src/pkg/runtime/proc.c:221
  exit status 2
  </code></pre>
  
  <p>What does it mean? Is the tutorial mistaken? What can I do to fix it?</p>