Browse files

gofmt

  • Loading branch information...
1 parent 994c00d commit 837e574d0fd555240e8fca26984d6f3b217ad159 @leandrosilva committed May 11, 2012
Showing with 8 additions and 8 deletions.
  1. +3 −3 src/dislock/lock/lock.go
  2. +5 −5 src/dislock/lock/lock_test.go
View
6 src/dislock/lock/lock.go
@@ -64,7 +64,7 @@ func tryAcquire(uuid string, client string) bool {
var redis = newPipeClient()
var key = key(uuid)
- redis.Watch(key)
+ redis.Watch(key)
// what about this lock?
redis.Multi()
@@ -81,7 +81,7 @@ func tryAcquire(uuid string, client string) bool {
}
} else {
// try to acquire the lock
- redis.Multi()
+ redis.Multi()
redis.Set(key, client)
var replySet = redis.Exec()[0].Elem.String()
@@ -90,7 +90,7 @@ func tryAcquire(uuid string, client string) bool {
return true
}
}
-
+
redis.Unwatch()
return false
View
10 src/dislock/lock/lock_test.go
@@ -67,11 +67,11 @@ func TestTryAcquire_Fail(t *testing.T) {
}
func TestAcquire(t *testing.T) {
- // Sometimes this test breaks because, I don't know exactly why, connection to Redis is lost
- // Maybe it is a time out but the error message is not too clear about that
- // If try it using, for example, a redis-cli instead of simulate with goroutine, it works
- // So I need to figure out how to automate this test in a better way
-
+ // Sometimes this test breaks because, I don't know exactly why, connection to Redis is lost
+ // Maybe it is a time out but the error message is not too clear about that
+ // If try it using, for example, a redis-cli instead of simulate with goroutine, it works
+ // So I need to figure out how to automate this test in a better way
+
reset()
var uuid = "nuclear_read"

0 comments on commit 837e574

Please sign in to comment.