Fix: typos

This commit is contained in:
Yoann La Cancellera
2023-11-21 15:57:15 +01:00
committed by Sveta Smirnova
parent 7876a0511c
commit 3fae43123e
10 changed files with 24 additions and 24 deletions

View File

@@ -10,7 +10,7 @@ import (
// Color is given its own type for safe function signatures
type Color string
// Color codes interpretted by the terminal
// Color codes interpreted by the terminal
// NOTE: all codes must be of the same length or they will throw off the field alignment of tabwriter
const (
ResetText Color = "\x1b[0000m"
@@ -109,11 +109,11 @@ func StringsReplaceReversed(s, old, new string, n int) string {
}
func UUIDToShortUUID(uuid string) string {
splitted := strings.Split(uuid, "-")
if len(splitted) != 5 {
split := strings.Split(uuid, "-")
if len(split) != 5 {
return uuid
}
return splitted[0] + "-" + splitted[3]
return split[0] + "-" + split[3]
}
// ShortNodeName helps reducing the node name when it is the default value (node hostname)