{"id":1463,"date":"2020-02-23T12:06:45","date_gmt":"2020-02-23T12:06:45","guid":{"rendered":"https:\/\/golangbyexamples.com\/?p=1463"},"modified":"2020-02-23T12:06:54","modified_gmt":"2020-02-23T12:06:54","slug":"multiline-string-go","status":"publish","type":"post","link":"https:\/\/golangbyexamples.com\/multiline-string-go\/","title":{"rendered":"Write multiline string in Go (Golang)"},"content":{"rendered":"\n
A backquote (`<\/strong>) can be used to write a multiline string in Golang. Note that a string encoded in backquotes is a raw literal string and doesn\u2019t honor any kind of escaping. Thus \\n, \\t are treated as a string literal when using back quotes<\/p>\n\n\n\n Working Code:<\/strong><\/p>\n\n\n\n Output<\/strong><\/p>\n\n\n\n A backquote (`) can be used to write a multiline string in Golang. Note that a string encoded in backquotes is a raw literal string and doesn\u2019t honor any kind of escaping….<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[1],"tags":[4],"class_list":["post-1463","post","type-post","status-publish","format-standard","hentry","category-tech","tag-golang"],"yoast_head":"\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n multiline := `This is \na multiline \nstring`\n\n fmt.Println(multiline)\n}<\/code><\/pre>\n\n\n\n
This is \na multiline \nstring<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"