multi line strings

Use back ticks, instead of the usual double quotes

package main
import "fmt"

func main() {
    longString :=
    `this is
    a very, very
    very long string
    notice the back ticks`

1 comment:

  1. If you indent each line as shown here then the extra space will end up in the string.