From fe6a551f06d511674fafb5766877320712fe0ed8 Mon Sep 17 00:00:00 2001 From: "Sascha L. Teichmann" Date: Fri, 24 Jul 2015 10:01:39 +0200 Subject: [PATCH] Break some over-long lines. --- cmd/mtredisalize/leveldb.go | 5 ++++- cmd/mtredisalize/sqlite.go | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/cmd/mtredisalize/leveldb.go b/cmd/mtredisalize/leveldb.go index b1307ca..caf0977 100644 --- a/cmd/mtredisalize/leveldb.go +++ b/cmd/mtredisalize/leveldb.go @@ -226,7 +226,10 @@ func (ldbs *LevelDBSession) CommitTransaction() (err error) { return } -func (ldbs *LevelDBSession) AllKeys(hash []byte, done chan struct{}) (keys chan []byte, n int, err error) { +func (ldbs *LevelDBSession) AllKeys( + hash []byte, + done chan struct{}) (keys chan []byte, n int, err error) { + ldbs.backend.mutex.RLock() ro := leveldb.NewReadOptions() diff --git a/cmd/mtredisalize/sqlite.go b/cmd/mtredisalize/sqlite.go index 9f827e5..b10abf8 100644 --- a/cmd/mtredisalize/sqlite.go +++ b/cmd/mtredisalize/sqlite.go @@ -277,7 +277,9 @@ func (ss *SqliteSession) CommitTransaction() error { return tx.Commit() } -func (ss *SqliteSession) AllKeys(hash []byte, done chan struct{}) (keys chan []byte, n int, err error) { +func (ss *SqliteSession) AllKeys( + hash []byte, + done chan struct{}) (keys chan []byte, n int, err error) { globalLock.RLock() countStmt := ss.txStmt(ss.backend.countStmt) @@ -324,7 +326,9 @@ func (ss *SqliteSession) AllKeys(hash []byte, done chan struct{}) (keys chan []b return } -func (ss *SqliteSession) SpatialQuery(hash, first, second []byte, done chan struct{}) (chan Block, error) { +func (ss *SqliteSession) SpatialQuery( + hash, first, second []byte, + done chan struct{}) (chan Block, error) { if ss.backend.interleaved { return ss.interleavedSpatialQuery(first, second, done) @@ -333,7 +337,9 @@ func (ss *SqliteSession) SpatialQuery(hash, first, second []byte, done chan stru return ss.plainSpatialQuery(first, second, done) } -func (ss *SqliteSession) interleavedSpatialQuery(first, second []byte, done chan struct{}) (blocks chan Block, err error) { +func (ss *SqliteSession) interleavedSpatialQuery( + first, second []byte, + done chan struct{}) (blocks chan Block, err error) { var ( firstKey int64 secondKey int64 @@ -409,7 +415,9 @@ func (ss *SqliteSession) interleavedSpatialQuery(first, second []byte, done chan return } -func (ss *SqliteSession) plainSpatialQuery(first, second []byte, done chan struct{}) (blocks chan Block, err error) { +func (ss *SqliteSession) plainSpatialQuery( + first, second []byte, + done chan struct{}) (blocks chan Block, err error) { var ( firstKey int64