we shouldn't make code more complex to make gocyclo happy. raising gocyclo limit

This commit is contained in:
Frederick F. Kautz IV
2015-04-18 10:05:18 -07:00
parent 426a12f0b9
commit 5691629ecd
2 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ lint:
cyclo:
@echo "Running $@:"
@test -z "$$(gocyclo -over 15 . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)"
@test -z "$$(gocyclo -over 16 . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)"
deadcode:
@echo "Running $@:"
+2 -5
View File
@@ -89,12 +89,9 @@ func doListCmd(ctx *cli.Context) {
var err error
var buckets []*client.Bucket
for i := 0; ; i++ {
buckets, err = clnt.ListBuckets()
for i := 0; i < globalMaxRetryFlag && err != nil; i++ {
buckets, err = clnt.ListBuckets()
if err == nil || i >= globalMaxRetryFlag {
break // Success. No more retries.
}
// Progressively longer delays
time.Sleep(time.Duration(i*i) * time.Second)
}
if err != nil {