mirror of
https://github.com/jwetzell/osc-go.git
synced 2026-08-15 19:53:40 +00:00
some linting things
This commit is contained in:
@@ -169,11 +169,12 @@ func slipEncode(bytes []byte) []byte {
|
||||
var encodedBytes = []byte{END}
|
||||
|
||||
for _, byteToEncode := range bytes {
|
||||
if byteToEncode == END {
|
||||
switch byteToEncode {
|
||||
case END:
|
||||
encodedBytes = append(encodedBytes, ESC, ESC_END)
|
||||
} else if byteToEncode == ESC {
|
||||
case ESC:
|
||||
encodedBytes = append(encodedBytes, ESC, ESC_ESC)
|
||||
} else {
|
||||
default:
|
||||
encodedBytes = append(encodedBytes, byteToEncode)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user