Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump github.com/fatih/color from 1.15.0 to 1.16.0 #2653

Merged
merged 2 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require (
github.com/cloudfoundry/sonde-go v0.0.0-20230710164515-a0a43d1dbbf8
github.com/cyphar/filepath-securejoin v0.2.4
github.com/docker/distribution v2.8.3+incompatible
github.com/fatih/color v1.15.0
github.com/fatih/color v1.16.0
github.com/google/go-querystring v1.1.0
github.com/jessevdk/go-flags v1.5.0
github.com/kr/pty v1.1.8
Expand Down Expand Up @@ -64,7 +64,7 @@ require (
github.com/gorilla/websocket v1.5.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
Expand Down
9 changes: 5 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ github.com/elazarl/goproxy v0.0.0-20230731152917-f99041a5c027 h1:1L0aalTpPz7YlMx
github.com/elazarl/goproxy v0.0.0-20230731152917-f99041a5c027/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
github.com/elazarl/goproxy/ext v0.0.0-20220417044921-416226498f94 h1:lTlYurl4RYJaQPm6t0fvJ2v95xGff9mcs0O70iQRFfo=
github.com/elazarl/goproxy/ext v0.0.0-20220417044921-416226498f94/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8=
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
Expand Down Expand Up @@ -152,8 +152,8 @@ github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY=
Expand Down Expand Up @@ -289,6 +289,7 @@ golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand Down
6 changes: 3 additions & 3 deletions util/ui/table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ var _ = Describe("Table", func() {
{"#0", "data1", "data2", "data3"},
},
2)
Expect(out).To(Say(" \x1b\\[1mheader1\x1b\\[0m")) // Makes sure empty values are not bolded
Expect(out).To(Say("\x1b\\[1mheader2\x1b\\[0m"))
Expect(out).To(Say("\x1b\\[1mheader3\x1b\\[0m"))
Expect(out).To(Say(" \u001B\\[1mheader1\u001B\\[22m")) // Makes sure empty values are not bolded
Expect(out).To(Say("\u001B\\[1mheader2\u001B\\[22m"))
Expect(out).To(Say("\u001B\\[1mheader3\u001B\\[22m"))
Expect(out).To(Say("#0 data1 data2 data3"))
})
})
Expand Down
20 changes: 10 additions & 10 deletions util/ui/ui_for_app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ var _ = Describe("UI", func() {
{"#2", "crashed", "val1", "val2"},
})

Expect(ui.Out).To(Say("\x1b\\[1mheader1\x1b\\[0m\\s+\x1b\\[1mheader2\x1b\\[0m\\s+\x1b\\[1mheader3\x1b\\[0m")) // Makes sure empty values are not bolded
Expect(ui.Out).To(Say("\u001B\\[1mheader1\u001B\\[22m\\s+\u001B\\[1mheader2\u001B\\[22m\\s+\u001B\\[1mheader3\u001B\\[22m")) // Makes sure empty values are not bolded
Expect(ui.Out).To(Say(`#0\s+starting\s+val1\s+val2`))
Expect(ui.Out).To(Say("#1\\s+\x1b\\[31;1mdown\x1b\\[0m\\s+val1\\s+val2"))
Expect(ui.Out).To(Say("#2\\s+\x1b\\[31;1mcrashed\x1b\\[0m\\s+val1\\s+val2"))
Expect(ui.Out).To(Say("#1\\s+\u001B\\[31;1mdown\u001B\\[0;22m\\s+val1\\s+val2"))
Expect(ui.Out).To(Say("#2\\s+\u001B\\[31;1mcrashed\u001B\\[0;22m\\s+val1\\s+val2"))
})
})

Expand All @@ -65,10 +65,10 @@ var _ = Describe("UI", func() {
{"#2", ui.TranslateText("crashed"), "val1", "val2"},
})

Expect(ui.Out).To(Say("\x1b\\[1mheader1\x1b\\[0m\\s+\x1b\\[1mheader2\x1b\\[0m\\s+\x1b\\[1mheader3\x1b\\[0m")) // Makes sure empty values are not bolded
Expect(ui.Out).To(Say("\u001B\\[1mheader1\u001B\\[22m\\s+\u001B\\[1mheader2\u001B\\[22m\\s+\u001B\\[1mheader3\u001B\\[22m")) // Makes sure empty values are not bolded
Expect(ui.Out).To(Say(`#0\s+%s\s+val1\s+val2`, ui.TranslateText("starting")))
Expect(ui.Out).To(Say("#1\\s+\x1b\\[31;1m%s\x1b\\[0m\\s+val1\\s+val2", ui.TranslateText("down")))
Expect(ui.Out).To(Say("#2\\s+\x1b\\[31;1m%s\x1b\\[0m\\s+val1\\s+val2", ui.TranslateText("crashed")))
Expect(ui.Out).To(Say("#1\\s+\u001B\\[31;1m%s\u001B\\[0;22m\\s+val1\\s+val2", ui.TranslateText("down")))
Expect(ui.Out).To(Say("#2\\s+\u001B\\[31;1m%s\u001B\\[0;22m\\s+val1\\s+val2", ui.TranslateText("crashed")))
})
})
})
Expand Down Expand Up @@ -144,8 +144,8 @@ var _ = Describe("UI", func() {

It("displays a table with requested state and instances in red", func() {
Expect(ui.Out).To(Say("name: dora\n"))
Expect(ui.Out).To(Say("requested state: \x1b\\[31;1mrunning\x1b\\[0m\n"))
Expect(ui.Out).To(Say("instances: \x1b\\[31;1m0/1\x1b\\[0m\n"))
Expect(ui.Out).To(Say("requested state: \u001B\\[31;1mrunning\u001B\\[0;22m\n"))
Expect(ui.Out).To(Say("instances: \u001B\\[31;1m0/1\u001B\\[0;22m\n"))
})
})

Expand All @@ -168,8 +168,8 @@ var _ = Describe("UI", func() {

It("displays a table with requested state and instances in red", func() {
Expect(ui.Out).To(Say("name: dora\n"))
Expect(ui.Out).To(Say("requested state: \x1b\\[31;1m%s\x1b\\[0m\n", ui.TranslateText("running")))
Expect(ui.Out).To(Say("instances: \x1b\\[31;1m0/1\x1b\\[0m\n"))
Expect(ui.Out).To(Say("requested state: \u001B\\[31;1m%s\u001B\\[0;22m\n", ui.TranslateText("running")))
Expect(ui.Out).To(Say("instances: \u001B\\[31;1m0/1\u001B\\[0;22m\n"))
})
})
})
Expand Down
22 changes: 11 additions & 11 deletions util/ui/ui_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ var _ = Describe("UI", func() {

It("displays the error to ui.Err and displays FAILED in bold red to ui.Out", func() {
Expect(ui.Err).To(Say("I am an error\n"))
Expect(out).To(Say("\x1b\\[31;1mFAILED\x1b\\[0m\n"))
Expect(out).To(Say("\u001B\\[31;1mFAILED\u001B\\[0;22m\n"))
})

When("the locale is not set to english", func() {
Expand All @@ -110,15 +110,15 @@ var _ = Describe("UI", func() {
It("displays the error text to ui.Err and displays FAILED in bold red to ui.Out", func() {
ui.DisplayError(errors.New("I am a BANANA!"))
Expect(ui.Err).To(Say("I am a BANANA!\n"))
Expect(out).To(Say("\x1b\\[31;1mFAILED\x1b\\[0m\n"))
Expect(out).To(Say("\u001B\\[31;1mFAILED\u001B\\[0;22m\n"))
})
})
})

Describe("DisplayHeader", func() {
It("displays the header colorized and bolded to ui.Out", func() {
ui.DisplayHeader("some-header")
Expect(out).To(Say("\x1b\\[1msome-header\x1b\\[0m"))
Expect(out).To(Say("\u001B\\[1msome-header\u001B\\[22m"))
})

When("the locale is not set to English", func() {
Expand All @@ -134,7 +134,7 @@ var _ = Describe("UI", func() {

It("displays the translated header colorized and bolded to ui.Out", func() {
ui.DisplayHeader("FEATURE FLAGS")
Expect(out).To(Say("\x1b\\[1mINDICATEURS DE FONCTION\x1b\\[0m"))
Expect(out).To(Say("\u001B\\[1mINDICATEURS DE FONCTION\u001B\\[22m"))
})
})
})
Expand All @@ -149,7 +149,7 @@ var _ = Describe("UI", func() {
Describe("DisplayOK", func() {
It("displays 'OK' in green and bold", func() {
ui.DisplayOK()
Expect(out).To(Say("\x1b\\[32;1mOK\x1b\\[0m"))
Expect(out).To(Say("\u001B\\[32;1mOK\u001B\\[0;22m"))
})
})

Expand Down Expand Up @@ -269,7 +269,7 @@ var _ = Describe("UI", func() {
map[string]interface{}{
"SomeMapValue": "map-value",
})
Expect(out).To(Say("template with \x1b\\[1mmap-value\x1b\\[0m"))
Expect(out).To(Say("template with \u001B\\[1mmap-value\u001B\\[22m"))
})
})

Expand All @@ -283,7 +283,7 @@ var _ = Describe("UI", func() {
map[string]interface{}{
"SomeOtherMapValue": "other-map-value",
})
Expect(out).To(Say("template with \x1b\\[1mmap-value\x1b\\[0m and <no value>"))
Expect(out).To(Say("template with \u001B\\[1mmap-value\u001B\\[22m and <no value>"))
})
})

Expand All @@ -304,7 +304,7 @@ var _ = Describe("UI", func() {
map[string]interface{}{
"AppName": "some-app-name",
})
Expect(out).To(Say("L'application \x1b\\[1msome-app-name\x1b\\[0m n'existe pas.\n"))
Expect(out).To(Say("L'application \u001B\\[1msome-app-name\u001B\\[22m n'existe pas.\n"))
})
})
})
Expand All @@ -322,7 +322,7 @@ var _ = Describe("UI", func() {
map[string]interface{}{
"SomeMapValue": "map-value",
})
Expect(out).To(Say("template with \x1b\\[36;1mmap-value\x1b\\[0m"))
Expect(out).To(Say("template with \u001B\\[36;1mmap-value\u001B\\[0;22m"))
})
})

Expand All @@ -336,7 +336,7 @@ var _ = Describe("UI", func() {
map[string]interface{}{
"SomeOtherMapValue": "other-map-value",
})
Expect(out).To(Say("template with \x1b\\[36;1mmap-value\x1b\\[0m and <no value>"))
Expect(out).To(Say("template with \u001B\\[36;1mmap-value\u001B\\[0;22m and <no value>"))
})
})

Expand All @@ -357,7 +357,7 @@ var _ = Describe("UI", func() {
map[string]interface{}{
"AppName": "some-app-name",
})
Expect(out).To(Say("L'application \x1b\\[36;1msome-app-name\x1b\\[0m n'existe pas.\n"))
Expect(out).To(Say("L'application \u001B\\[36;1msome-app-name\u001B\\[0;22m n'existe pas.\n"))
})
})
})
Expand Down
Loading