feat: replaced color package to support Windows (#3207)

This commit is contained in:
ALMAS
2023-05-05 21:09:54 +08:00
committed by GitHub
parent 8ad0668612
commit 774e8d1d08
16 changed files with 55 additions and 85 deletions

View File

@@ -12,7 +12,7 @@ import (
"path/filepath"
"strings"
"github.com/logrusorgru/aurora"
"github.com/gookit/color"
"github.com/zeromicro/go-zero/tools/goctl/internal/version"
)
@@ -58,7 +58,7 @@ func RemoveOrQuit(filename string) error {
}
fmt.Printf("%s exists, overwrite it?\nEnter to overwrite or Ctrl-C to cancel...",
aurora.BgRed(aurora.Bold(filename)))
color.New(color.BgRed, color.Bold).Render(filename))
bufio.NewReader(os.Stdin).ReadBytes('\n')
return os.Remove(filename)