1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 03:23:49 +08:00

ci: make golangci-lint happy

This commit is contained in:
wdvxdr 2023-01-31 21:20:48 +08:00
parent 4ed04443c5
commit 06450c66a2

View File

@ -94,8 +94,8 @@ func writeQuote(b *bytes.Buffer, s string) {
c = 't' c = 't'
} }
b.WriteByte(c) b.WriteByte(c)
i = j + 1 j++
j = j + 1 i = j
continue continue
case '<', '>', '&': case '<', '>', '&':
@ -103,8 +103,8 @@ func writeQuote(b *bytes.Buffer, s string) {
b.WriteString(`\u00`) b.WriteString(`\u00`)
b.WriteByte(hex[c>>4]) b.WriteByte(hex[c>>4])
b.WriteByte(hex[c&0xF]) b.WriteByte(hex[c&0xF])
i = j + 1 j++
j = j + 1 i = j
continue continue
} }
@ -114,8 +114,8 @@ func writeQuote(b *bytes.Buffer, s string) {
b.WriteString(`\u00`) b.WriteString(`\u00`)
b.WriteByte(hex[c>>4]) b.WriteByte(hex[c>>4])
b.WriteByte(hex[c&0xF]) b.WriteByte(hex[c&0xF])
i = j + 1 j++
j = j + 1 i = j
continue continue
} }
@ -124,8 +124,8 @@ func writeQuote(b *bytes.Buffer, s string) {
if r == utf8.RuneError && size == 1 { if r == utf8.RuneError && size == 1 {
b.WriteString(s[i:j]) b.WriteString(s[i:j])
b.WriteString(`\ufffd`) b.WriteString(`\ufffd`)
i = j + size j += size
j = j + size i = j
continue continue
} }
@ -141,8 +141,8 @@ func writeQuote(b *bytes.Buffer, s string) {
b.WriteString(s[i:j]) b.WriteString(s[i:j])
b.WriteString(`\u202`) b.WriteString(`\u202`)
b.WriteByte(hex[r&0xF]) b.WriteByte(hex[r&0xF])
i = j + size j += size
j = j + size i = j
continue continue
} }