minor linting things

This commit is contained in:
Joel Wetzell
2026-05-17 09:50:08 -05:00
parent 4bdfe0b00a
commit ad4aa91e08
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -159,7 +159,7 @@ func run(ctx context.Context, c *cli.Command) error {
return errors.New("config path cannot be empty")
}
logLevel := slog.LevelInfo
var logLevel slog.Level
logLevelFromFlag := c.String("log-level")
+3 -2
View File
@@ -25,9 +25,10 @@ func (sf *SlipFramer) Decode(data []byte) [][]byte {
}
if escapeNext {
if packetByte == ESC_END {
switch packetByte {
case ESC_END:
sf.buffer = append(sf.buffer, END)
} else if packetByte == ESC_ESC {
case ESC_ESC:
sf.buffer = append(sf.buffer, ESC)
}
escapeNext = false
+1 -1
View File
@@ -236,7 +236,7 @@ func (ts *TCPServer) Output(ctx context.Context, payload any) error {
for _, connection := range ts.connections {
_, err := connection.Write(payloadBytes)
if err != nil {
errorString.WriteString(fmt.Sprintf("%s\n", err.Error()))
fmt.Fprintf(&errorString, "%s\n", err.Error())
}
}
ts.connectionsMu.Unlock()