Clear staticcheck, gopls and go.mod warnings

This commit is contained in:
flamingcow
2026-07-26 10:33:38 -07:00
parent 102d53fb9b
commit 5e2b36bdaa
3 changed files with 14 additions and 17 deletions
-8
View File
@@ -60,14 +60,6 @@ var patterns = []pattern{
}},
}
func patternNames() []string {
names := make([]string, len(patterns))
for i, p := range patterns {
names[i] = p.name
}
return names
}
// Every pattern is laid out at full length up front with its checksum at each
// size, so a sender picks a pattern by choosing a buffer, never by writing one.
type frameSpec struct {
+4 -3
View File
@@ -3,7 +3,8 @@ module g.fc.run/theater/cabletest
go 1.26.5
require (
golang.org/x/image v0.44.0 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/text v0.40.0 // indirect
golang.org/x/image v0.44.0
golang.org/x/sys v0.47.0
)
require golang.org/x/text v0.40.0 // indirect
+10 -6
View File
@@ -199,14 +199,18 @@ func renderBox(title string, headers []string, rights []bool, rows [][]string) s
}
var b strings.Builder
if title != "" {
b.WriteString(paint(title, cBold+cCyan) + "\n")
writeln := func(s string) {
b.WriteString(s)
b.WriteByte('\n')
}
b.WriteString(line("┌", "┬", "┐") + "\n")
b.WriteString(rowText(headers, true) + "\n")
b.WriteString(line("├", "┼", "┤") + "\n")
if title != "" {
writeln(paint(title, cBold+cCyan))
}
writeln(line("┌", "┬", "┐"))
writeln(rowText(headers, true))
writeln(line("├", "┼", "┤"))
for _, r := range rows {
b.WriteString(rowText(r, false) + "\n")
writeln(rowText(r, false))
}
b.WriteString(line("└", "┴", "┘"))
return b.String()