array string ke golang string

str1 := []string{"the","cat","in","the","hat"}
fmt.Println(str1)
 
str2 := strings.Join(str1, " ")
fmt.Println(str2)
 
str3 := strings.Join(str1, ", ")
fmt.Println(str3)
 
Output:
[the cat in the hat]
the cat in the hat
the, cat, in, the, hat
dreamer_69