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
+5k Unix/Linux : How to test user agents blocked successfully ?
+17.7k Golang : Set, Get and List environment variables
+19.6k Golang : Underscore or snake_case to camel case example
+9.9k Golang : Get UDP client IP address and differentiate clients by port number
+38k Golang : How to read CSV file
+26.9k Golang : Decode/unmarshal unknown JSON data type with map[string]interface
+6.2k Golang : Takes a plural word and makes it singular
+11.5k Golang : Send data to /dev/null a.k.a blackhole with ioutil.Discard
+14.3k Golang : How to get Unix file descriptor for console and file
+39.8k Golang : How to count duplicate items in slice/array?
+29.5k Golang : Calculate percentage change of two values
+29.2k Golang : Remove characters from string example