Literal

Raw string literals

Backticks preserve backslashes and allow newlines. A raw string cannot contain a backtick. Carriage-return characters in the source literal are discarded. Example output: '"a\\\\nb"'.

Formal Syntax & Structure

go syntaxgo
`a\nb`

Working Example

Example Snippetgo
package main
import "fmt"
func main() {  fmt.Printf("%q\n", `a\nb`)}
Go Reference