This is an especially useful technique when working with large like SQL, HTML or XML within Go. Instead of using either the double quote (“) or single quote symbols (‘), instead use back-ticks to define the start and end of the string. You can then wrap it across lines. If you indent the string though, remember that the white space will count.
package main import "fmt" func main() { message := `This is a Multi-line Text String Because it uses the raw-string back ticks instead of quotes.



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here