I was writing out an HTML tag and I needed a string that had a single quote in it. So I had to enclose the string with double quotes. There are probably many and… better ways of doing this in Go, but this (in my early Go days) is what I came up with…
// The following is a string but the double quotes are NOT part of the string s := "it's a nice day" fmt.Println(s) dblQuote := string('"') fmt.Printf("%T %v\n", dblQuote, dblQuote) // Include double quotes in the string s = dblQuote + s + dblQuote fmt.Println(s)