🔨 Replace color utils with 'github.com/fatih/color'

This commit is contained in:
2025-03-02 20:18:11 +04:00
parent a01bf19986
commit 4cb0540824
6 changed files with 26 additions and 52 deletions

View File

@@ -16,6 +16,7 @@ import (
"github.com/aykhans/dodo/requests"
"github.com/aykhans/dodo/utils"
"github.com/aykhans/dodo/validation"
"github.com/fatih/color"
goValidator "github.com/go-playground/validator/v10"
)
@@ -109,13 +110,13 @@ func main() {
responses, err := requests.Run(ctx, requestConf)
if err != nil {
if customerrors.Is(err, customerrors.ErrInterrupt) {
utils.PrintlnC(utils.Colors.Yellow, err.Error())
color.Yellow(err.Error())
return
} else if customerrors.Is(err, customerrors.ErrNoInternet) {
utils.PrintAndExit("No internet connection")
return
}
panic(err)
utils.PrintErrAndExit(err)
}
responses.Print()