Make golangci-lint happy

This commit is contained in:
Till Faelligen 2020-11-09 17:55:06 +01:00
parent a3ac1c644e
commit eda7ace3f8
3 changed files with 3 additions and 4 deletions

View file

@ -30,6 +30,7 @@ import (
)
const receiptsSchema = `
CREATE SEQUENCE IF NOT EXISTS syncapi_stream_id;
-- Stores data about receipts
CREATE TABLE IF NOT EXISTS syncapi_receipts (
-- The ID

View file

@ -35,8 +35,6 @@ type SyncServerDatasource struct {
sqlutil.PartitionOffsetStatements
}
const createSequence = "CREATE SEQUENCE IF NOT EXISTS syncapi_stream_id;"
// NewDatabase creates a new sync server database
func NewDatabase(dbProperties *config.DatabaseOptions) (*SyncServerDatasource, error) {
var d SyncServerDatasource

View file

@ -621,7 +621,7 @@ func (d *Database) addEDUDeltaToResponse(
if fromPos.EDUPosition() != toPos.EDUPosition() {
// add typing deltas
if err := d.addTypingDeltaToResponse(fromPos, joinedRoomIDs, res); err != nil {
return fmt.Errorf("unable to apply typing delta to response: %w")
return fmt.Errorf("unable to apply typing delta to response: %w", err)
}
}
@ -629,7 +629,7 @@ func (d *Database) addEDUDeltaToResponse(
if (fromPos.EDUPosition() == 0 && toPos.EDUPosition() == 0) ||
fromPos.EDUPosition() != toPos.EDUPosition() {
if err := d.addReceiptDeltaToResponse(fromPos, joinedRoomIDs, res); err != nil {
return fmt.Errorf("unable to apply receipts to response: %w")
return fmt.Errorf("unable to apply receipts to response: %w", err)
}
}