Cannot assign string with single quote in golang
<p>I am learning go and when playing with string I noticed that if a string is in single quotes then golang is giving me an error but double quotes are working fine. </p>

<pre><code>func main() {
    var a string
    a = 'hello' //will give error
    a = "hello" //will not give error
}
</code></pre>

<p>This is the error I get on my system:</p>

<pre><code>illegal rune literal
</code></pre>

<p>While when I try to do the same on playground I am getting this error:</p>

<pre><code>prog.go:9: missing '
prog.go:9: syntax error: unexpected name, expecting semicolon or newline or }
prog.go:9: newline in string
prog.go:9: empty character literal or unescaped ' in character literal
prog.go:9: missing '
</code></pre>

<p>I am not able to understand the exact reason behind this as in for example Python, Perl one can declare a string with both single and double quote. </p>