Raw strings
This is an example Go program illustrating the use of raw strings.
package main import ( "fmt" ) func main() { raw := `A raw string can contain backslashes, '\', quotes '"', but not backticks.` fmt.Println(raw) rawback := `You can include backticks like `+"`"+` this` fmt.Println(rawback) }
The output of the example looks like this:
A raw string can contain backslashes, '\', quotes '"', but not backticks. You can include backticks like ` this
Copyright © Ben Bullock 2009-2024. All
rights reserved.
For comments, questions, and corrections, please email
Ben Bullock
(benkasminbullock@gmail.com).
/
Privacy /
Disclaimer