-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmessage.go
More file actions
37 lines (29 loc) · 813 Bytes
/
message.go
File metadata and controls
37 lines (29 loc) · 813 Bytes
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
package msg
import (
"fmt"
"os"
"github.com/pinecone-io/cli/internal/pkg/utils/style"
)
func FailMsg(format string, a ...any) {
formatted := fmt.Sprintf(format, a...)
fmt.Fprintln(os.Stderr, style.FailMsg(formatted))
}
func SuccessMsg(format string, a ...any) {
formatted := fmt.Sprintf(format, a...)
fmt.Fprintln(os.Stderr, style.SuccessMsg(formatted))
}
func WarnMsg(format string, a ...any) {
formatted := fmt.Sprintf(format, a...)
fmt.Fprintln(os.Stderr, style.WarnMsg(formatted))
}
func InfoMsg(format string, a ...any) {
formatted := fmt.Sprintf(format, a...)
fmt.Fprintln(os.Stderr, style.InfoMsg(formatted))
}
func HintMsg(format string, a ...any) {
formatted := fmt.Sprintf(format, a...)
fmt.Fprintln(os.Stderr, style.Hint(formatted))
}
func Blank() {
fmt.Fprintln(os.Stderr, "")
}