@kjk1/

book strings

Go

No description

fork
loading
Files
  • main.go

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.20452329089618404","path":"main.go","file":{"path":"main.go","content":{"asEncoding":{"base64":"cGFja2FnZSBtYWluCgppbXBvcnQgImZtdCIKCmZ1bmMgbWFpbigpIHsKCS8vIDpzaG93IHN0YXJ0Cgl2YXIgcyBzdHJpbmcgLy8gZW1wdHkgc3RyaW5nICIiCglzMSA6PSAic3RyaW5nXG5saXRlcmFsXG53aXRoXHRlc2NhcGUgY2hhcmFjdGVyc1xuIgoJczIgOj0gYHJhdyBzdHJpbmcgbGl0ZXJhbAp3aGljaCBkb2VzbnQndCByZWNnb25pemUgZXNjYXBlIGNoYXJhY3RlcnMgbGlrZSBcbgpgCglmbXQuUHJpbnRmKCJzdW0gb2Ygc3RyaW5nc1xuJyVzJ1xuIiwgcytzMStzMikKCS8vIDpzaG93IGVuZAp9Cg=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package main

import "fmt"

func main() {
	// :show start
	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)
	// :show end
}