]> git.giacomolli.uk - onechat/blobdiff - syncer_test.go
Separate multiline Go statements
[onechat] / syncer_test.go
index 16f334530fc5def0b111ea702589926b3b209274..d463eecbcf7a2babd89b3e22cd04d8c91df38378 100644 (file)
@@ -148,6 +148,13 @@ type SyncerGatedSync struct {
        release chan struct{}
 }
 
        release chan struct{}
 }
 
+func newSyncerGatedSync() *SyncerGatedSync {
+       return &SyncerGatedSync{
+               started: make(chan struct{}, 100),
+               release: make(chan struct{}),
+       }
+}
+
 func (g *SyncerGatedSync) Sync() error {
        g.mutex.Lock()
 
 func (g *SyncerGatedSync) Sync() error {
        g.mutex.Lock()
 
@@ -184,13 +191,6 @@ func (g *SyncerGatedSync) Count() int {
        return g.count
 }
 
        return g.count
 }
 
-func newSyncerGatedSync() *SyncerGatedSync {
-       return &SyncerGatedSync{
-               started: make(chan struct{}, 100),
-               release: make(chan struct{}),
-       }
-}
-
 // syncerRunKilledWriter starts the writer child on the chat in root, kills it
 // with SIGKILL after it acknowledged count messages, and returns the number of
 // messages that it acknowledged.
 // syncerRunKilledWriter starts the writer child on the chat in root, kills it
 // with SIGKILL after it acknowledged count messages, and returns the number of
 // messages that it acknowledged.