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
+42.6k Golang : Use wildcard patterns with filepath.Glob() example
+2k Golang : Fix go-cron set time not working issue
+8.1k Golang : Create unique title slugs example
+6.4k Golang : Handling Yes No Quit query input
+8.9k Golang : Random Rune generator
+22.8k Golang : How to print rune, unicode, utf-8 and non-ASCII CJK(Chinese/Japanese/Korean) characters?
+7k Golang : Add build version and other information in executables
+12k Golang : How to get a user home directory path?
+35.2k Golang : Convert(cast) int64 to string
+5.6k Unix/Linux : How to get own IP address ?
+8.7k Golang : Ordinal and Ordinalize a given number to the English ordinal numeral