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
+9.8k Golang : Convert octal value to string to deal with leading zero problem
+44.5k Golang : Use wildcard patterns with filepath.Glob() example
+15k Golang : How to get Unix file descriptor for console and file
+42.9k Golang : Get hardware information such as disk, memory and CPU usage
+23k Golang : Print out struct values in string format
+19.9k Swift : Convert (cast) Int to int32 or Uint32
+5.2k Unix/Linux/MacOSx : How to remove an environment variable ?
+8k Golang : Auto-generate reply email with text/template package
+6.7k Golang : Pat multiplexer routing example
+9.2k Golang : Scramble and unscramble text message by randomly replacing words
+41.2k Golang : Convert string to array/slice