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

@@ -11,15 +11,13 @@ import (
"io/ioutil"
"os"
"path/filepath"
"runtime"
"strings"
"time"
"github.com/logrusorgru/aurora"
"github.com/gookit/color"
"github.com/spf13/cobra"
"github.com/zeromicro/go-zero/tools/goctl/util/console"
"github.com/zeromicro/go-zero/tools/goctl/util/ctx"
"github.com/zeromicro/go-zero/tools/goctl/vars"
)
const defaultMigrateVersion = "v1.3.0"
@@ -246,10 +244,7 @@ It's recommended to use the replacement package, do you want to replace?
['Y' for yes, 'N' for no, 'A' for all, 'I' for ignore]: `,
deprecated, replacement)
if runtime.GOOS != vars.OsWindows {
msg = aurora.Yellow(msg).String()
}
fmt.Print(msg)
fmt.Print(color.Yellow.Render(msg))
for {
var in string