1. Multiline strings

Creating a multiline string in Go is actually incredibly easy. Simply use the backtick (`) character when declaring or assigning your string value.

str := `This is a

2. Efficient concatenation

Go 1.10 has a new strings.Builder!

While the code below still works, Go 1.10 introduced the Builder type to the strings package which can be easier to use and is typically a little more efficient. I’ve written about using it in the article, Concatenating and Building Strings in Go 1.10+.

While Go does allow you to concatenate strings with the + operator, this can become pretty inefficient when concatenating a lot of strings together. It is much more efficient to use a bytes.Buffer and then convert it to a string once you have concatenated everything.

3. Convert ints (or any data type) into strings

In many languages you can easily convert any data type into a string simply be concatenating it with a string, or by using string interpolation (eg "ID=#{id}" in ruby). Unfortunately, if you try to do what seems obvious in Go, like casting an int to a string, you are unlikely to get what you expected.

Source: jstips.co