feat: xmnt

This commit is contained in:
Yiyang Kang 2022-10-07 01:19:04 +08:00
parent 00b3e4b24f
commit 5a998b713c
16 changed files with 1481 additions and 0 deletions

22
msg/msg.go Normal file
View file

@ -0,0 +1,22 @@
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")
}