Print an Emoji in Go
When writing debug messages to logs or console, I find it useful to use emojis to bring attention to certain lines. In Go, you can do this in two ways -
Add emojis directly in the code:
println("🚨 🚨 🚨 ATTENION! 🚨 🚨 🚨")
Or use the Unicode code point:
println("\U0001F6A8 \U0001F6A8 \U0001F6A8 ATTENION! \U0001F6A8 \U0001F6A8 \U0001F6A8")
In both cases, the output will look like this:
🚨 🚨 🚨 ATTENION! 🚨 🚨 🚨