all repos — emoji @ v1.0.0

A minimalistic emoji package for Go (golang)

fmt.go (view raw)

 1package emoji
 2
 3import (
 4	"fmt"
 5	"io"
 6)
 7
 8// Sprint wraps fmt.Sprint with emoji support
 9func Sprint(a ...interface{}) string {
10	return Parse(fmt.Sprint(a...))
11}
12
13// Sprintf wraps fmt.Sprintf with emoji support
14func Sprintf(format string, a ...interface{}) string {
15	return Parse(fmt.Sprintf(format, a...))
16}
17
18// Sprintln wraps fmt.Sprintln with emoji support
19func Sprintln(a ...interface{}) string {
20	return Parse(fmt.Sprintln(a...))
21}
22
23// Print wraps fmt.Print with emoji support
24func Print(a ...interface{}) (n int, err error) {
25	return fmt.Print(Sprint(a...))
26}
27
28// Println wraps fmt.Println with emoji support
29func Println(a ...interface{}) (n int, err error) {
30	return fmt.Println(Sprint(a...))
31}
32
33// Printf wraps fmt.Printf with emoji support
34func Printf(format string, a ...interface{}) (n int, err error) {
35	return fmt.Print(Sprintf(format, a...))
36}
37
38// Fprint wraps fmt.Fprint with emoji support
39func Fprint(w io.Writer, a ...interface{}) (n int, err error) {
40	return fmt.Fprint(w, Sprint(a...))
41}
42
43// Fprintf wraps fmt.Fprintf with emoji support
44func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {
45	return fmt.Fprint(w, Sprintf(format, a...))
46}
47
48// Fprintln wraps fmt.Fprintln with emoji support
49func Fprintln(w io.Writer, a ...interface{}) (n int, err error) {
50	return fmt.Fprintln(w, Sprint(a...))
51}
52
53// Errorf wraps fmt.Errorf with emoji support
54func Errorf(format string, a ...interface{}) error {
55	return fmt.Errorf(Sprintf(format, a...))
56}