23 lines
395 B
Go
23 lines
395 B
Go
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")
|
|
}
|