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
+7.1k Golang : How to convert strange string to JSON with json.MarshalIndent
+22.2k Golang : Set and Get HTTP request headers example
+7.6k Golang : Get today's weekday name and calculate target day distance example
+7k Golang : File system scanning
+7.9k Golang : Metaprogramming example of wrapping a function
+16.7k Golang : Get number of CPU cores
+32.5k Golang : How to check if a date is within certain range?
+20.8k Golang : Create and resolve(read) symbolic links
+22.7k Golang : Randomly pick an item from a slice/array example
+5k Golang : Pad file extension automagically
+9.4k Golang : Populate slice with sequential integers example
+4.6k Golang : PGX CopyFrom to insert rows into Postgres database