xmnt/msg/msg.go

23 lines
395 B
Go
Raw Permalink Normal View History

2022-10-07 02:19:04 +09:00
package msg
import (
"os"
"github.com/fatih/color"
)
var (
infoStyle = color.New(color.FgBlue)
errStyle = color.New(color.FgRed)
)
func Infof(format string, a ...any) {
_, _ = infoStyle.Fprintf(os.Stderr, format, a...)
_, _ = os.Stderr.WriteString("\n")
}
func Errorf(format string, a ...any) {
_, _ = errStyle.Fprintf(os.Stderr, format, a...)
_, _ = os.Stderr.WriteString("\n")
}