mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-08-12 01:43:40 +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")
|
||||
}
|
||||
|
||||
logLevel := slog.LevelInfo
|
||||
var logLevel slog.Level
|
||||
|
||||
logLevelFromFlag := c.String("log-level")
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user