Shouldn't strconv.Unquote
handle both single and double quotes?
See also https://golang.org/src/strconv/quote.go - line 350
However following code returns a syntax error
:
s, err := strconv.Unquote(`'test'`)
if err != nil {
fmt.Println(err)
} else {
fmt.Println(s)
}
https://play.golang.org/p/TnprqhNdwD1
But double quotes work as expected:
s, err := strconv.Unquote(`"test"`)
if err != nil {
fmt.Println(err)
} else {
fmt.Println(s)
}
What am I missing?