diff --git a/go.mod b/go.mod
index 85d963fc..c3353c71 100644
--- a/go.mod
+++ b/go.mod
@@ -21,7 +21,7 @@ require (
github.com/go-gomail/gomail v0.0.0-20160411212932-81ebce5c23df
github.com/go-playground/validator/v10 v10.30.0
github.com/hashicorp/nomad/api v0.0.0-20251209201056-5b76eb053561 // v1.11.1
- github.com/jedib0t/go-pretty/v6 v6.7.7
+ github.com/jedib0t/go-pretty/v6 v6.7.8
github.com/matcornic/hermes/v2 v2.1.0
github.com/microcosm-cc/bluemonday v1.0.27
github.com/moby/buildkit v0.26.3
diff --git a/go.sum b/go.sum
index b26ece73..3a3f395b 100644
--- a/go.sum
+++ b/go.sum
@@ -191,8 +191,8 @@ github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28=
github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/jaytaylor/html2text v0.0.0-20180606194806-57d518f124b0 h1:xqgexXAGQgY3HAjNPSaCqn5Aahbo5TKsmhp8VRfr1iQ=
github.com/jaytaylor/html2text v0.0.0-20180606194806-57d518f124b0/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk=
-github.com/jedib0t/go-pretty/v6 v6.7.7 h1:Y1Id3lJ3k4UB8uwWWy3l8EVFnUlx5chR5+VbsofPNX0=
-github.com/jedib0t/go-pretty/v6 v6.7.7/go.mod h1:YwC5CE4fJ1HFUDeivSV1r//AmANFHyqczZk+U6BDALU=
+github.com/jedib0t/go-pretty/v6 v6.7.8 h1:BVYrDy5DPBA3Qn9ICT+PokP9cvCv1KaHv2i+Hc8sr5o=
+github.com/jedib0t/go-pretty/v6 v6.7.8/go.mod h1:YwC5CE4fJ1HFUDeivSV1r//AmANFHyqczZk+U6BDALU=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
diff --git a/vendor/github.com/jedib0t/go-pretty/v6/table/render_csv.go b/vendor/github.com/jedib0t/go-pretty/v6/table/render_csv.go
index e9ea5ef8..89745657 100644
--- a/vendor/github.com/jedib0t/go-pretty/v6/table/render_csv.go
+++ b/vendor/github.com/jedib0t/go-pretty/v6/table/render_csv.go
@@ -36,11 +36,11 @@ func (t *Table) RenderCSV() string {
}
func (t *Table) csvFixCommas(str string) string {
- return strings.Replace(str, ",", "\\,", -1)
+ return strings.ReplaceAll(str, ",", "\\,")
}
func (t *Table) csvFixDoubleQuotes(str string) string {
- return strings.Replace(str, "\"", "\\\"", -1)
+ return strings.ReplaceAll(str, "\"", "\\\"")
}
func (t *Table) csvRenderRow(out *strings.Builder, row rowStr, hint renderHint) {
@@ -54,7 +54,7 @@ func (t *Table) csvRenderRow(out *strings.Builder, row rowStr, hint renderHint)
// auto-index column
if colIdx == 0 && t.autoIndex {
if hint.isRegularRow() {
- out.WriteString(fmt.Sprint(hint.rowNumber))
+ fmt.Fprint(out, hint.rowNumber)
}
out.WriteRune(',')
}
diff --git a/vendor/github.com/jedib0t/go-pretty/v6/table/render_html.go b/vendor/github.com/jedib0t/go-pretty/v6/table/render_html.go
index fec68f00..07b18501 100644
--- a/vendor/github.com/jedib0t/go-pretty/v6/table/render_html.go
+++ b/vendor/github.com/jedib0t/go-pretty/v6/table/render_html.go
@@ -151,7 +151,7 @@ func (t *Table) htmlRenderColumnAutoIndex(out *strings.Builder, hint renderHint)
out.WriteString("\n")
} else {
out.WriteString("
")
- out.WriteString(fmt.Sprint(hint.rowNumber))
+ fmt.Fprint(out, hint.rowNumber)
out.WriteString(" | \n")
}
}
@@ -191,10 +191,10 @@ func (t *Table) htmlRenderRow(out *strings.Builder, row rowStr, hint renderHint)
t.htmlRenderColumnAttributes(out, colIdx, hint, align)
if extraColumnsRendered > 0 {
out.WriteString(" colspan=")
- out.WriteString(fmt.Sprint(extraColumnsRendered + 1))
+ fmt.Fprint(out, extraColumnsRendered+1)
} else if rowSpan := t.shouldMergeCellsVerticallyBelow(colIdx, hint); rowSpan > 1 {
out.WriteString(" rowspan=")
- out.WriteString(fmt.Sprint(rowSpan))
+ fmt.Fprint(out, rowSpan)
}
out.WriteString(">")
if len(colStr) == 0 {
diff --git a/vendor/github.com/jedib0t/go-pretty/v6/table/render_markdown.go b/vendor/github.com/jedib0t/go-pretty/v6/table/render_markdown.go
index 80cdcc07..ff298b1f 100644
--- a/vendor/github.com/jedib0t/go-pretty/v6/table/render_markdown.go
+++ b/vendor/github.com/jedib0t/go-pretty/v6/table/render_markdown.go
@@ -66,7 +66,7 @@ func (t *Table) markdownRenderRowAutoIndex(out *strings.Builder, colIdx int, hin
if hint.isSeparatorRow {
out.WriteString("---:")
} else if hint.isRegularRow() {
- out.WriteString(fmt.Sprintf("%d ", hint.rowNumber))
+ fmt.Fprintf(out, "%d ", hint.rowNumber)
}
out.WriteRune('|')
}
diff --git a/vendor/github.com/jedib0t/go-pretty/v6/table/render_tsv.go b/vendor/github.com/jedib0t/go-pretty/v6/table/render_tsv.go
index 312f365d..9e0c4dd5 100644
--- a/vendor/github.com/jedib0t/go-pretty/v6/table/render_tsv.go
+++ b/vendor/github.com/jedib0t/go-pretty/v6/table/render_tsv.go
@@ -40,7 +40,7 @@ func (t *Table) tsvRenderRow(out *strings.Builder, row rowStr, hint renderHint)
for idx, col := range row {
if idx == 0 && t.autoIndex {
if hint.isRegularRow() {
- out.WriteString(fmt.Sprint(hint.rowNumber))
+ fmt.Fprint(out, hint.rowNumber)
}
out.WriteRune('\t')
}
@@ -51,7 +51,7 @@ func (t *Table) tsvRenderRow(out *strings.Builder, row rowStr, hint renderHint)
if strings.ContainsAny(col, "\t\n\"") || strings.Contains(col, " ") {
col = strings.ReplaceAll(col, "\"", "\"\"") // fix double-quotes
- out.WriteString(fmt.Sprintf("\"%s\"", col))
+ fmt.Fprintf(out, "\"%s\"", col)
} else {
out.WriteString(col)
}
diff --git a/vendor/github.com/jedib0t/go-pretty/v6/text/ansi.go b/vendor/github.com/jedib0t/go-pretty/v6/text/ansi.go
index 6f13b656..8436ffab 100644
--- a/vendor/github.com/jedib0t/go-pretty/v6/text/ansi.go
+++ b/vendor/github.com/jedib0t/go-pretty/v6/text/ansi.go
@@ -15,18 +15,22 @@ var ANSICodesSupported = areANSICodesSupported()
// Escape("Nymeria\x1b[94mGhost\x1b[0mLady", "\x1b[91m") == "\x1b[91mNymeria\x1b[94mGhost\x1b[0m\x1b[91mLady\x1b[0m"
// Escape("Nymeria \x1b[94mGhost\x1b[0m Lady", "\x1b[91m") == "\x1b[91mNymeria \x1b[94mGhost\x1b[0m\x1b[91m Lady\x1b[0m"
func Escape(str string, escapeSeq string) string {
- out := ""
+ var out strings.Builder
+ // Estimate capacity: original string + escape sequences
+ out.Grow(len(str) + len(escapeSeq)*3 + len(EscapeReset)*2)
+
if !strings.HasPrefix(str, EscapeStart) {
- out += escapeSeq
+ out.WriteString(escapeSeq)
}
- out += strings.Replace(str, EscapeReset, EscapeReset+escapeSeq, -1)
- if !strings.HasSuffix(out, EscapeReset) {
- out += EscapeReset
+ out.WriteString(strings.ReplaceAll(str, EscapeReset, EscapeReset+escapeSeq))
+ if !strings.HasSuffix(out.String(), EscapeReset) {
+ out.WriteString(EscapeReset)
}
- if strings.Contains(out, escapeSeq+EscapeReset) {
- out = strings.Replace(out, escapeSeq+EscapeReset, "", -1)
+ result := out.String()
+ if strings.Contains(result, escapeSeq+EscapeReset) {
+ result = strings.ReplaceAll(result, escapeSeq+EscapeReset, "")
}
- return out
+ return result
}
// StripEscape strips all ANSI Escape Sequence from the string.
diff --git a/vendor/github.com/jedib0t/go-pretty/v6/text/valign.go b/vendor/github.com/jedib0t/go-pretty/v6/text/valign.go
index f1a75e96..8e086d92 100644
--- a/vendor/github.com/jedib0t/go-pretty/v6/text/valign.go
+++ b/vendor/github.com/jedib0t/go-pretty/v6/text/valign.go
@@ -27,10 +27,11 @@ func (va VAlign) Apply(lines []string, maxLines int) []string {
maxLines = len(lines)
}
- insertIdx := 0
- if va == VAlignMiddle {
+ var insertIdx int
+ switch va {
+ case VAlignMiddle:
insertIdx = int(maxLines-len(lines)) / 2
- } else if va == VAlignBottom {
+ case VAlignBottom:
insertIdx = maxLines - len(lines)
}
diff --git a/vendor/github.com/jedib0t/go-pretty/v6/text/wrap.go b/vendor/github.com/jedib0t/go-pretty/v6/text/wrap.go
index 8a9e803d..fd657f79 100644
--- a/vendor/github.com/jedib0t/go-pretty/v6/text/wrap.go
+++ b/vendor/github.com/jedib0t/go-pretty/v6/text/wrap.go
@@ -13,7 +13,7 @@ func WrapHard(str string, wrapLen int) string {
if wrapLen <= 0 {
return ""
}
- str = strings.Replace(str, "\t", " ", -1)
+ str = strings.ReplaceAll(str, "\t", " ")
sLen := StringWidthWithoutEscSequences(str)
if sLen <= wrapLen {
return str
@@ -41,7 +41,7 @@ func WrapSoft(str string, wrapLen int) string {
if wrapLen <= 0 {
return ""
}
- str = strings.Replace(str, "\t", " ", -1)
+ str = strings.ReplaceAll(str, "\t", " ")
sLen := StringWidthWithoutEscSequences(str)
if sLen <= wrapLen {
return str
@@ -68,7 +68,7 @@ func WrapText(str string, wrapLen int) string {
if wrapLen <= 0 {
return ""
}
- str = strings.Replace(str, "\t", " ", -1)
+ str = strings.ReplaceAll(str, "\t", " ")
sLen := StringWidthWithoutEscSequences(str)
if sLen <= wrapLen {
return str
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 09196094..4511d471 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -254,7 +254,7 @@ github.com/imdario/mergo
# github.com/jaytaylor/html2text v0.0.0-20180606194806-57d518f124b0
## explicit
github.com/jaytaylor/html2text
-# github.com/jedib0t/go-pretty/v6 v6.7.7
+# github.com/jedib0t/go-pretty/v6 v6.7.8
## explicit; go 1.18
github.com/jedib0t/go-pretty/v6/table
github.com/jedib0t/go-pretty/v6/text