From aff817a1fc47f834f82301ede28dabbc1ea1cabb Mon Sep 17 00:00:00 2001 From: fibonacci1729 Date: Sun, 31 Jul 2016 23:34:50 -0600 Subject: [PATCH] run gofmt --- pkg/storage/driver/driver.go | 4 ++-- pkg/storage/driver/memory.go | 2 +- pkg/storage/driver/memory_test.go | 6 +++--- pkg/storage/storage.go | 4 ++-- pkg/storage/storage_test.go | 24 ++++++++++++------------ 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/pkg/storage/driver/driver.go b/pkg/storage/driver/driver.go index b6e2de5e7..c6670cb41 100644 --- a/pkg/storage/driver/driver.go +++ b/pkg/storage/driver/driver.go @@ -24,7 +24,7 @@ var ( // ErrReleaseNotFound indicates that a release is not found. ErrReleaseNotFound = errors.New("release not found") // Temporary error while WIP. - ErrNotImplemented = errors.New("not implemented") + ErrNotImplemented = errors.New("not implemented") ) type Creator interface { @@ -50,4 +50,4 @@ type Driver interface { Updator Deletor Queryor -} \ No newline at end of file +} diff --git a/pkg/storage/driver/memory.go b/pkg/storage/driver/memory.go index 8c5394106..e5301f0de 100644 --- a/pkg/storage/driver/memory.go +++ b/pkg/storage/driver/memory.go @@ -103,4 +103,4 @@ func (mem *Memory) rlock() func() { } } -func unlock(fn func()) { fn() } \ No newline at end of file +func unlock(fn func()) { fn() } diff --git a/pkg/storage/driver/memory_test.go b/pkg/storage/driver/memory_test.go index 001718e10..728cdb603 100644 --- a/pkg/storage/driver/memory_test.go +++ b/pkg/storage/driver/memory_test.go @@ -16,8 +16,8 @@ limitations under the License. package driver // import "k8s.io/helm/pkg/storage/driver" import ( - "testing" rspb "k8s.io/helm/pkg/proto/hapi/release" + "testing" ) func TestMemoryGet(t *testing.T) { @@ -79,7 +79,7 @@ func TestMemoryDelete(t *testing.T) { if err := mem.Create(rls); err != nil { t.Fatalf("Failed create: %s", err) } - + res, err := mem.Delete(key) switch { case err != nil: @@ -89,4 +89,4 @@ func TestMemoryDelete(t *testing.T) { case res.Info.Status.Code != release.Status_DELETED: t.Errorf("Expected Status_DELETED, got %s", res.Info.Status.Code) } -} \ No newline at end of file +} diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go index d5e2cf91b..6345d33d6 100644 --- a/pkg/storage/storage.go +++ b/pkg/storage/storage.go @@ -16,8 +16,8 @@ limitations under the License. package storage // import "k8s.io/helm/pkg/storage" import ( - "k8s.io/helm/pkg/storage/driver" rspb "k8s.io/helm/pkg/proto/hapi/release" + "k8s.io/helm/pkg/storage/driver" ) type Storage struct { @@ -45,4 +45,4 @@ func Init(drv driver.Driver) *Storage { drv = driver.NewMemory() } return &Storage{drv: drv} -} \ No newline at end of file +} diff --git a/pkg/storage/storage_test.go b/pkg/storage/storage_test.go index 691ffdd5e..d84e1cd71 100644 --- a/pkg/storage/storage_test.go +++ b/pkg/storage/storage_test.go @@ -17,12 +17,12 @@ package storage // import "k8s.io/helm/pkg/storage" import ( "fmt" - "time" "reflect" "testing" + "time" - "k8s.io/helm/pkg/storage/driver" rspb "k8s.io/helm/pkg/proto/hapi/release" + "k8s.io/helm/pkg/storage/driver" tspb "github.com/golang/protobuf/ptypes" ) @@ -61,10 +61,10 @@ func TestStoreRelease(t *testing.T) { t.Fatalf(fmt.Sprintf("Failed to %s: %q", msg, err)) } } - + rls := releaseData() ckerr(storage.StoreRelease(rls), "StoreRelease") - + res, err := storage.QueryRelease(rls.Name) ckerr(err, "QueryRelease") @@ -79,10 +79,10 @@ func TestQueryRelease(t *testing.T) { t.Fatalf(fmt.Sprintf("Failed to %s: %q", msg, err)) } } - + rls := releaseData() ckerr(storage.StoreRelease(rls), "StoreRelease") - + res, err := storage.QueryRelease(rls.Name) ckerr(err, "QueryRelease") @@ -97,10 +97,10 @@ func TestDeleteRelease(t *testing.T) { t.Fatalf(fmt.Sprintf("Failed to %s: %q", msg, err)) } } - + rls := releaseData() ckerr(storage.StoreRelease(rls), "StoreRelease") - + res, err := storage.DeleteRelease(rls.Name) ckerr(err, "DeleteRelease") @@ -121,12 +121,12 @@ func TestUpdateRelease(t *testing.T) { t.Fatalf(fmt.Sprintf("Failed to %s: %q", msg, err)) } } - + rls := releaseData() ckerr(storage.StoreRelease(rls), "StoreRelease") - rls.Name = "hungry-hippo" - rls.Version = 2 + rls.Name = "hungry-hippo" + rls.Version = 2 rls.Manifest = "old-manifest" err := storage.UpdateRelease(rls) @@ -138,4 +138,4 @@ func TestUpdateRelease(t *testing.T) { ckeql(res.Name, rls.Name, "Expected Name") ckeql(res.Version, rls.Version, "Expected Version") ckeql(res.Manifest, rls.Manifest, "Expected Manifest") -} \ No newline at end of file +}