Want to add the extra emojis to your Golang projects? Here’s a way to add the :scream: emoji when you encounter an error.
package main
import (
"fmt"
"unicode/utf8"
)
func main() {
b := []byte{0xF0, 0x9F, 0x98, 0xB1}
r, _ := utf8.DecodeRune(b)
fmt.Printf("%c\n", r)
}