From f00bfd38da8f197e46a792e8035ddaddb4e07633 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 19 May 2015 18:32:50 -0700 Subject: [PATCH] Bump gocyclo back to 16 --- Makefile | 2 +- pkg/storage/donut/donut.go | 4 ++++ pkg/storage/donut/donut_bucket.go | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index fc6d4ed0b..b1cc2fd55 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ lint: cyclo: @echo "Running $@:" - @test -z "$$(gocyclo -over 18 . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)" + @test -z "$$(gocyclo -over 16 . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)" pre-build: @echo "Running pre-build:" diff --git a/pkg/storage/donut/donut.go b/pkg/storage/donut/donut.go index 83c3580d6..eff08edcb 100644 --- a/pkg/storage/donut/donut.go +++ b/pkg/storage/donut/donut.go @@ -38,6 +38,10 @@ const ( // bucket, object metadata bucketMetadataConfig = "bucketMetadata.json" objectMetadataConfig = "objectMetadata.json" + + // versions + objectMetadataVersion = "1.0" + donutObjectMetadataVersion = "1.0" ) // attachDonutNode - wrapper function to instantiate a new node for associated donut diff --git a/pkg/storage/donut/donut_bucket.go b/pkg/storage/donut/donut_bucket.go index 4ba4a0705..185e0cef8 100644 --- a/pkg/storage/donut/donut_bucket.go +++ b/pkg/storage/donut/donut_bucket.go @@ -149,8 +149,8 @@ func (b bucket) PutObject(objectName string, objectData io.Reader, expectedMD5Su summer := md5.New() objectMetadata := make(map[string]string) donutObjectMetadata := make(map[string]string) - objectMetadata["version"] = "1.0" - donutObjectMetadata["version"] = "1.0" + objectMetadata["version"] = objectMetadataVersion + donutObjectMetadata["version"] = donutObjectMetadataVersion size := metadata["contentLength"] sizeInt, err := strconv.ParseInt(size, 10, 64) if err != nil {