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