Creating a multiline string in Go

Simple example of creating a multiline string in Go.

Multiline string example

To create a multiline string, simply use backticks instead of quotes

multiLineString := `
This is
a multi
line
string
`

fmt.Println(multiLineString)
// output:
// This is
// a multi
// line
// string

For other Golang examples: https://www.mikesallese.me/tags/golang