mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-09-01 19:28:58 +00:00
minor linting things
This commit is contained in:
@@ -159,7 +159,7 @@ func run(ctx context.Context, c *cli.Command) error {
|
|||||||
return errors.New("config path cannot be empty")
|
return errors.New("config path cannot be empty")
|
||||||
}
|
}
|
||||||
|
|
||||||
logLevel := slog.LevelInfo
|
var logLevel slog.Level
|
||||||
|
|
||||||
logLevelFromFlag := c.String("log-level")
|
logLevelFromFlag := c.String("log-level")
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,10 @@ func (sf *SlipFramer) Decode(data []byte) [][]byte {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if escapeNext {
|
if escapeNext {
|
||||||
if packetByte == ESC_END {
|
switch packetByte {
|
||||||
|
case ESC_END:
|
||||||
sf.buffer = append(sf.buffer, END)
|
sf.buffer = append(sf.buffer, END)
|
||||||
} else if packetByte == ESC_ESC {
|
case ESC_ESC:
|
||||||
sf.buffer = append(sf.buffer, ESC)
|
sf.buffer = append(sf.buffer, ESC)
|
||||||
}
|
}
|
||||||
escapeNext = false
|
escapeNext = false
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ func (ts *TCPServer) Output(ctx context.Context, payload any) error {
|
|||||||
for _, connection := range ts.connections {
|
for _, connection := range ts.connections {
|
||||||
_, err := connection.Write(payloadBytes)
|
_, err := connection.Write(payloadBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errorString.WriteString(fmt.Sprintf("%s\n", err.Error()))
|
fmt.Fprintf(&errorString, "%s\n", err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ts.connectionsMu.Unlock()
|
ts.connectionsMu.Unlock()
|
||||||
|
|||||||
Reference in New Issue
Block a user