My question is quite simple, I use back tick to initiate a string array, but I found that golang treats this array differently:
import (
"fmt"
"reflect"
)
func main() {
x := []string{`hello world`, "me"}
y := []string{"hello", "world", "me"}
fmt.Println(x)
fmt.Println(y)
fmt.Println(reflect.DeepEqual(x, y))
}
The output is:
[hello world me]
[hello world me]
false
This makes me confused: should I make sure all string arrays are initiated in the same way?