Go substring operation, no index out of range?
<p>I would like know why "s[1:]" in the 2nd fmt.Println isn't throwing an index out of range error? Index 1 is clearly out of range</p>

<pre><code>package main

import "fmt"

func main() {

   s := "J"

   //fmt.Println(s[1]) // This results in a runtime error: index out of range

   fmt.Println(s[1:]) // Why does this work? Index value 1 is clearly out of range, but the statement prints an empty string

}
</code></pre>