Commit d934ab32 authored by Tzlil Swimmer's avatar Tzlil Swimmer
Browse files

fix color and remove extra space

parent dbfb0244
No related merge requests found
Showing with 13 additions and 13 deletions
+13 -13
......@@ -206,8 +206,8 @@ func GetWarningExtraMessages(invalidFile *validation.InvalidK8sFile) []printer.E
if IsHelmFile(invalidFile.Path) {
extraMessages = append(extraMessages, printer.ExtraMessage{
Text: "Are you trying to test a raw helm file ? To run Datree with Helm - check out the helm plugin README:\nhttps://github.com/datreeio/helm-datree",
Color: "blue",
Text: "Are you trying to test a raw helm file? To run Datree with Helm - check out the helm plugin README:\nhttps://github.com/datreeio/helm-datree",
Color: "cyan",
})
}
return extraMessages
......
......@@ -214,8 +214,8 @@ func (p *Printer) createNewColor(clr string) *color.Color {
return p.Theme.Colors.Yellow
case "green":
return p.Theme.Colors.Green
case "blue":
return p.Theme.Colors.Blue
case "cyan":
return p.Theme.Colors.Cyan
default:
return p.Theme.Colors.White
}
......
......@@ -36,8 +36,8 @@ func TestPrintWarnings(t *testing.T) {
Title: ">> File: /datree/datree/internal/fixtures/kube/Chart.yaml\n",
FailedRules: []FailedRule{},
InvalidK8sInfo: InvalidK8sInfo{ValidationErrors: []error{fmt.Errorf("K8S validation error")}, K8sVersion: "1.18.0"},
ExtraMessages: []ExtraMessage{{Text: "Are you trying to test a raw helm file ? To run Datree with Helm - check out the helm plugin README:\nhttps://github.com/datreeio/helm-datree",
Color: "blue"}},
ExtraMessages: []ExtraMessage{{Text: "Are you trying to test a raw helm file? To run Datree with Helm - check out the helm plugin README:\nhttps://github.com/datreeio/helm-datree",
Color: "cyan"}},
},
}
......@@ -82,7 +82,7 @@ Failed with k8s validation
[X] Kubernetes schema validation
❌ K8S validation error
Are you trying to test a raw helm file ? To run Datree with Helm - check out the helm plugin README:
Are you trying to test a raw helm file? To run Datree with Helm - check out the helm plugin README:
https://github.com/datreeio/helm-datree
[?] Policy check didn't run for this file
......@@ -134,7 +134,7 @@ Failed with k8s validation
[X] Kubernetes schema validation
[X] K8S validation error
Are you trying to test a raw helm file ? To run Datree with Helm - check out the helm plugin README:
Are you trying to test a raw helm file? To run Datree with Helm - check out the helm plugin README:
https://github.com/datreeio/helm-datree
[?] Policy check didn't run for this file
......
......@@ -14,7 +14,7 @@ type Theme struct {
RedBold *color.Color
White *color.Color
Error *color.Color
Blue *color.Color
Cyan *color.Color
}
ColorsAttributes struct {
Green color.Attribute
......@@ -37,14 +37,14 @@ func createDefaultTheme() *Theme {
RedBold *color.Color
White *color.Color
Error *color.Color
Blue *color.Color
Cyan *color.Color
}{
Green: color.New(color.FgGreen),
Yellow: color.New(color.FgYellow),
RedBold: color.New(color.FgHiRed, color.Bold),
Error: color.New(color.FgHiRed),
White: color.New(color.FgHiWhite),
Blue: color.New(color.FgBlue),
Cyan: color.New(color.FgCyan),
},
ColorsAttributes: struct {
Green color.Attribute
......@@ -73,14 +73,14 @@ func CreateSimpleTheme() *Theme {
RedBold *color.Color
White *color.Color
Error *color.Color
Blue *color.Color
Cyan *color.Color
}{
Green: color.New(),
Yellow: color.New(),
RedBold: color.New(),
Error: color.New(),
White: color.New(),
Blue: color.New(),
Cyan: color.New(),
},
ColorsAttributes: struct {
Green color.Attribute
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment