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
+18.1k Golang : How to log each HTTP request to your web server?
+7.1k Golang : How to call function inside template with template.FuncMap
+9k Golang : Accept any number of function arguments with three dots(...)
+5.9k Golang : Find change in a combination of coins example
+19.9k Golang : Archive directory with tar and gzip
+13.6k Facebook PHP getUser() returns 0
+20.3k Golang : Compare floating-point numbers
+12.5k Golang : Flush and close file created by os.Create and bufio.NewWriter example
+27.9k PHP : Count number of JSON items/objects
+22.3k Golang : How to run Golang application such as web server in the background or as daemon?
+27.5k Golang : Convert CSV data to JSON format and save to file
+38.2k Golang : Read a text file and replace certain words