In Go, multi-line strings can be formatted and printed using the backtick (`) character for string literals. Here's an example:
package main
import "fmt"
func main() {
multiLineString := `This is
a multi-line
string.`
fmt.Println(multiLineString)
}
Output:
This is
a multi-line
string.
By using the backtick character, any whitespace and new lines within the string literal are preserved when printed.