Golang : Dealing with backquote
Just a quick tutorial note on how to deal with backquote in Golang or rather a note for myself :P
Wrap the backquote with "
in order to place a backquote inside a fmt.Println()
function.
For example :
package main
import "fmt"
func main() {
fmt.Println("" + "`" + "")
// in between string
fmt.Println(("a " + "`" + " backquote"))
}
Output :
`
a ` backquote
Hope you may find this simple tutorial useful.
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+3.7k PHP : Get client IP address
+14.6k Golang : When to use init() function?
+15.3k Golang : Reset or rewind io.Reader or io.Writer
+5.7k Golang : Append and add item in slice
+38.1k Golang : Encode image to base64 example
+5.8k Golang : Scramble and unscramble text message by randomly replacing words
+8.4k Golang : Clean formatting/indenting or pretty print JSON result
+15.9k Golang : Read input from console line
+11.9k Golang : How to tell if a file is compressed either gzip or zip ?
+7.4k Golang : Display a text file line by line with line number example
+19k Golang : How to read integer value from standard input ?