style: 合入后修 gofmt/govet 与 RegistrationView 类型检查
This commit is contained in:
@@ -191,15 +191,15 @@ LIMIT ?`, endpointID, room)
|
||||
var items []pushItem
|
||||
for rows.Next() {
|
||||
var it pushItem
|
||||
if err := rows.Scan(&it.seq, &it.sendAt, &it.keep, &it.expireAt, &it.msgID, &it.senderID, &it.destKind, &it.destID, &it.meta, &it.contentType, &it.bodyEnc, &it.body); err != nil {
|
||||
if scanErr := rows.Scan(&it.seq, &it.sendAt, &it.keep, &it.expireAt, &it.msgID, &it.senderID, &it.destKind, &it.destID, &it.meta, &it.contentType, &it.bodyEnc, &it.body); scanErr != nil {
|
||||
_ = rows.Close()
|
||||
return err
|
||||
return scanErr
|
||||
}
|
||||
items = append(items, it)
|
||||
}
|
||||
_ = rows.Close()
|
||||
if err := rows.Err(); err != nil {
|
||||
return err
|
||||
if rowsErr := rows.Err(); rowsErr != nil {
|
||||
return rowsErr
|
||||
}
|
||||
|
||||
var toClaim []pushItem
|
||||
@@ -217,9 +217,9 @@ LIMIT ?`, endpointID, room)
|
||||
Meta: decodeMetaJSON(it.meta),
|
||||
SendAtMs: it.sendAt,
|
||||
}
|
||||
payload, err := protocol.Marshal(msg)
|
||||
if err != nil {
|
||||
return err
|
||||
payload, marshErr := protocol.Marshal(msg)
|
||||
if marshErr != nil {
|
||||
return marshErr
|
||||
}
|
||||
limit := effectivePayloadLimit(live.MaxPacketSize, live.MaxReceiveBytes)
|
||||
if limit > 0 && len(payload) > limit {
|
||||
|
||||
Reference in New Issue
Block a user