The Go language declares a variable of a multi line string
- 2020-05-27 05:52:11
- OfStack
How does Go declare a variable of a multi-line string ? Use 'to include.
package main
import (
"fmt"
)
func main() {
str := `hello
world
v2.0`
fmt.Println(str)
}
Demo: http: / / play. golang. org/p/BOL8_SwQ0D
That's all for this article, I hope you enjoy it.