Fix: there is no color in the diff report (#4511)

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
This commit is contained in:
barnettZQG
2022-08-01 18:26:38 +08:00
committed by GitHub
parent f7d3fbaeca
commit b05d3bb066
+5
View File
@@ -26,6 +26,7 @@ import (
"time"
restfulspec "github.com/emicklei/go-restful-openapi/v2"
"github.com/fatih/color"
"github.com/go-openapi/spec"
"github.com/google/uuid"
flag "github.com/spf13/pflag"
@@ -82,6 +83,10 @@ func main() {
return
}
// The server is not terminal, there is no color default.
// Force set to false, this is useful for the dry-run API.
color.NoColor = false
errChan := make(chan error)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()