Skip to content

Commit 3483be6

Browse files
authored
Merge pull request #2264 from ripienaar/dependencies
(misc) Update dependencies and go
2 parents 89506be + bb90c7c commit 3483be6

File tree

24 files changed

+169
-101
lines changed

24 files changed

+169
-101
lines changed

.github/workflows/integration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
test:
66
strategy:
77
matrix:
8-
go: ["1.24"]
8+
go: ["1.25"]
99

1010
runs-on: ubuntu-latest
1111
steps:

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
test:
66
strategy:
77
matrix:
8-
go: ["1.23.9", "1.24"] # using 1.23.9 temporarily because of some github actions cache issue
8+
go: ["1.24", "1.25"]
99

1010
runs-on: ubuntu-latest
1111
steps:

choria/framework.go

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,26 @@ func (fw *Framework) PQLQueryCertNames(query string) ([]string, error) {
928928

929929
// Colorize returns a string of either 'red', 'green' or 'yellow'. If the 'color' configuration
930930
// is set to false then the string will have no color hints
931-
func (fw *Framework) Colorize(c string, format string, a ...any) string {
931+
func (fw *Framework) Colorize(c string, s string) string {
932+
if !fw.Config.Color {
933+
return fmt.Sprint(s)
934+
}
935+
936+
switch c {
937+
case "red":
938+
return color.RedString(s)
939+
case "green":
940+
return color.GreenString(s)
941+
case "yellow":
942+
return color.YellowString(s)
943+
default:
944+
return s
945+
}
946+
}
947+
948+
// Colorizef returns a string of either 'red', 'green' or 'yellow'. If the 'color' configuration
949+
// is set to false then the string will have no color hints
950+
func (fw *Framework) Colorizef(c string, format string, a ...any) string {
932951
if !fw.Config.Color {
933952
return fmt.Sprintf(format, a...)
934953
}

client/aaa_signerclient/requester.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2025, R.I. Pienaar and the Choria Project contributors
2+
//
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
// generated code; DO NOT EDIT
26

37
package aaa_signerclient
@@ -133,10 +137,10 @@ func (r *requester) configureProgress(count int) {
133137

134138
r.progress.PrependFunc(func(b *uiprogress.Bar) string {
135139
if b.Current() < count {
136-
return r.client.fw.Colorize("red", "%d / %d", b.Current(), count)
140+
return r.client.fw.Colorizef("red", "%d / %d", b.Current(), count)
137141
}
138142

139-
return r.client.fw.Colorize("green", "%d / %d", b.Current(), count)
143+
return r.client.fw.Colorizef("green", "%d / %d", b.Current(), count)
140144
})
141145

142146
uiprogress.Start()

client/choria_provisionclient/requester.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2025, R.I. Pienaar and the Choria Project contributors
2+
//
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
// generated code; DO NOT EDIT
26

37
package choria_provisionclient
@@ -133,10 +137,10 @@ func (r *requester) configureProgress(count int) {
133137

134138
r.progress.PrependFunc(func(b *uiprogress.Bar) string {
135139
if b.Current() < count {
136-
return r.client.fw.Colorize("red", "%d / %d", b.Current(), count)
140+
return r.client.fw.Colorizef("red", "%d / %d", b.Current(), count)
137141
}
138142

139-
return r.client.fw.Colorize("green", "%d / %d", b.Current(), count)
143+
return r.client.fw.Colorizef("green", "%d / %d", b.Current(), count)
140144
})
141145

142146
uiprogress.Start()

client/choria_registryclient/requester.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2025, R.I. Pienaar and the Choria Project contributors
2+
//
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
// generated code; DO NOT EDIT
26

37
package choria_registryclient
@@ -133,10 +137,10 @@ func (r *requester) configureProgress(count int) {
133137

134138
r.progress.PrependFunc(func(b *uiprogress.Bar) string {
135139
if b.Current() < count {
136-
return r.client.fw.Colorize("red", "%d / %d", b.Current(), count)
140+
return r.client.fw.Colorizef("red", "%d / %d", b.Current(), count)
137141
}
138142

139-
return r.client.fw.Colorize("green", "%d / %d", b.Current(), count)
143+
return r.client.fw.Colorizef("green", "%d / %d", b.Current(), count)
140144
})
141145

142146
uiprogress.Start()

client/choria_utilclient/requester.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2025, R.I. Pienaar and the Choria Project contributors
2+
//
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
// generated code; DO NOT EDIT
26

37
package choria_utilclient
@@ -133,10 +137,10 @@ func (r *requester) configureProgress(count int) {
133137

134138
r.progress.PrependFunc(func(b *uiprogress.Bar) string {
135139
if b.Current() < count {
136-
return r.client.fw.Colorize("red", "%d / %d", b.Current(), count)
140+
return r.client.fw.Colorizef("red", "%d / %d", b.Current(), count)
137141
}
138142

139-
return r.client.fw.Colorize("green", "%d / %d", b.Current(), count)
143+
return r.client.fw.Colorizef("green", "%d / %d", b.Current(), count)
140144
})
141145

142146
uiprogress.Start()

client/executorclient/requester.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2025, R.I. Pienaar and the Choria Project contributors
2+
//
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
// generated code; DO NOT EDIT
26

37
package executorclient
@@ -133,10 +137,10 @@ func (r *requester) configureProgress(count int) {
133137

134138
r.progress.PrependFunc(func(b *uiprogress.Bar) string {
135139
if b.Current() < count {
136-
return r.client.fw.Colorize("red", "%d / %d", b.Current(), count)
140+
return r.client.fw.Colorizef("red", "%d / %d", b.Current(), count)
137141
}
138142

139-
return r.client.fw.Colorize("green", "%d / %d", b.Current(), count)
143+
return r.client.fw.Colorizef("green", "%d / %d", b.Current(), count)
140144
})
141145

142146
uiprogress.Start()

client/rpcutilclient/requester.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2025, R.I. Pienaar and the Choria Project contributors
2+
//
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
// generated code; DO NOT EDIT
26

37
package rpcutilclient
@@ -133,10 +137,10 @@ func (r *requester) configureProgress(count int) {
133137

134138
r.progress.PrependFunc(func(b *uiprogress.Bar) string {
135139
if b.Current() < count {
136-
return r.client.fw.Colorize("red", "%d / %d", b.Current(), count)
140+
return r.client.fw.Colorizef("red", "%d / %d", b.Current(), count)
137141
}
138142

139-
return r.client.fw.Colorize("green", "%d / %d", b.Current(), count)
143+
return r.client.fw.Colorizef("green", "%d / %d", b.Current(), count)
140144
})
141145

142146
uiprogress.Start()

client/scoutclient/requester.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2025, R.I. Pienaar and the Choria Project contributors
2+
//
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
// generated code; DO NOT EDIT
26

37
package scoutclient
@@ -133,10 +137,10 @@ func (r *requester) configureProgress(count int) {
133137

134138
r.progress.PrependFunc(func(b *uiprogress.Bar) string {
135139
if b.Current() < count {
136-
return r.client.fw.Colorize("red", "%d / %d", b.Current(), count)
140+
return r.client.fw.Colorizef("red", "%d / %d", b.Current(), count)
137141
}
138142

139-
return r.client.fw.Colorize("green", "%d / %d", b.Current(), count)
143+
return r.client.fw.Colorizef("green", "%d / %d", b.Current(), count)
140144
})
141145

142146
uiprogress.Start()

0 commit comments

Comments
 (0)