Skip to content

Commit 6575213

Browse files
authored
Merge pull request #14 from jianxiaoguo/main
chore(go): bump version 1.24
2 parents 04810c5 + 0acd981 commit 6575213

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/drycc/pkg
22

3-
go 1.23
3+
go 1.24
44

55
require (
66
github.com/Masterminds/cookoo v1.3.0

prettyprint/colorizer.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,13 @@ func Overwritef(msg string, args ...interface{}) string {
183183
// test testing
184184
func PrettyTabs(msg map[string]string, spaces int) string {
185185
// find the longest key so we know how much padding to use
186-
max := 0
186+
maxLength := 0
187187
for key := range msg {
188-
if len(key) > max {
189-
max = len(key)
188+
if len(key) > maxLength {
189+
maxLength = len(key)
190190
}
191191
}
192-
max += spaces
192+
maxLength += spaces
193193

194194
// sort the map keys so we can print them alphabetically
195195
var keys []string
@@ -200,7 +200,7 @@ func PrettyTabs(msg map[string]string, spaces int) string {
200200

201201
var output string
202202
for _, k := range keys {
203-
output += fmt.Sprintf("%s%s%s\n", k, strings.Repeat(" ", max-len(k)), msg[k])
203+
output += fmt.Sprintf("%s%s%s\n", k, strings.Repeat(" ", maxLength-len(k)), msg[k])
204204
}
205205
return output
206206
}

0 commit comments

Comments
 (0)