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
+6.5k Golang : Example of how to detect which type of script a word belongs to
+6.8k Golang : Error reading timestamp with GORM or SQL driver
+6.1k Golang : Get Alexa ranking data example
+11.1k Golang : Send data to /dev/null a.k.a blackhole with ioutil.Discard
+17.2k Golang : Logging with logrus
+31.6k Golang : Smarter Error Handling with strings.Contains()
+2.9k Java : Random alphabets, alpha-numeric or numbers only string generator
+5.2k Golang : Debug with Godebug
+6.9k Swift : Convert (cast) String to Double
+10.8k Golang : Clean formatting/indenting or pretty print JSON result
+5k Golang : Shuffle array of list
+7.3k Golang : Metaprogramming example of wrapping a function