Quick actions

cmd+k|ctrl+k

Navigation

Languages

Basic types / Strings / Essential Go

Snippet info

Language

Go

Visibility

public

Author

kkowalczyk

Created

2019-03-26T10:02:44Z

Updated

2019-03-26T10:02:44Z

package main

import "fmt"

func main() {
	var s string // empty string ""
	s1 := "string\nliteral\nwith\tescape characters\n"
	s2 := `raw string literal
which doesnt't recgonize escape characters like \n
`
	fmt.Printf("sum of strings\n'%s'\n", s+s1+s2)
}
INFO