How to Write multiline strings in Go

To create or write multiline strings in Go, use the backtick (`) character while declaring or assigning value to the string.

Multiline strings are very helpful when working with large strings like SQL, HTML or XML files inside Go.

multiline_string := `select * from
emp
`

Please go through the below example to understand it further.

package main

import "fmt"

func main() {

	multiline_string := `Hello Gophers
welcom to golangtutorial.dev
`

	fmt.Printf("%s", multiline_string)
}

//OUTPUT
Hello Gophers
welcom to golangtutorial.dev