From ab689cf0a5c73e1fa0525416fa12aaf5ba88abc9 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Wed, 5 Aug 2015 23:38:12 -0400 Subject: [PATCH] 6260: gofmt --- services/keepstore/handlers.go | 3 ++- services/keepstore/perms_test.go | 2 +- services/keepstore/pull_worker_integration_test.go | 6 ++++-- services/keepstore/pull_worker_test.go | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/services/keepstore/handlers.go b/services/keepstore/handlers.go index d1169d5df9..c4ecfb4c88 100644 --- a/services/keepstore/handlers.go +++ b/services/keepstore/handlers.go @@ -193,13 +193,14 @@ type PoolStatus struct { } type NodeStatus struct { - Volumes []*VolumeStatus `json:"volumes"` + Volumes []*VolumeStatus `json:"volumes"` BufferPool PoolStatus Memory runtime.MemStats } var st NodeStatus var stLock sync.Mutex + func StatusHandler(resp http.ResponseWriter, req *http.Request) { stLock.Lock() ReadNodeStatus(&st) diff --git a/services/keepstore/perms_test.go b/services/keepstore/perms_test.go index 85883b03a7..e43cb8dcd9 100644 --- a/services/keepstore/perms_test.go +++ b/services/keepstore/perms_test.go @@ -48,7 +48,7 @@ func TestVerifySignatureExtraHints(t *testing.T) { PermissionSecret = []byte(known_key) defer func() { PermissionSecret = nil }() - if VerifySignature(known_locator+"+K@xyzzy"+known_sig_hint, known_token) != nil{ + if VerifySignature(known_locator+"+K@xyzzy"+known_sig_hint, known_token) != nil { t.Fatal("Verify cannot handle hint before permission signature") } diff --git a/services/keepstore/pull_worker_integration_test.go b/services/keepstore/pull_worker_integration_test.go index 762abff533..3e57407369 100644 --- a/services/keepstore/pull_worker_integration_test.go +++ b/services/keepstore/pull_worker_integration_test.go @@ -107,7 +107,7 @@ func TestPullWorkerIntegration_GetExistingLocator(t *testing.T) { func performPullWorkerIntegrationTest(testData PullWorkIntegrationTestData, pullRequest PullRequest, t *testing.T) { // Override PutContent to mock PutBlock functionality - defer func(orig func([]byte, string)(error)) { PutContent = orig }(PutContent) + defer func(orig func([]byte, string) error) { PutContent = orig }(PutContent) PutContent = func(content []byte, locator string) (err error) { if string(content) != testData.Content { t.Errorf("PutContent invoked with unexpected data. Expected: %s; Found: %s", testData.Content, content) @@ -116,7 +116,9 @@ func performPullWorkerIntegrationTest(testData PullWorkIntegrationTestData, pull } // Override GetContent to mock keepclient Get functionality - defer func(orig func(string, *keepclient.KeepClient)(io.ReadCloser, int64, string, error)) { GetContent = orig }(GetContent) + defer func(orig func(string, *keepclient.KeepClient) (io.ReadCloser, int64, string, error)) { + GetContent = orig + }(GetContent) GetContent = func(signedLocator string, keepClient *keepclient.KeepClient) ( reader io.ReadCloser, contentLength int64, url string, err error) { if testData.GetError != "" { diff --git a/services/keepstore/pull_worker_test.go b/services/keepstore/pull_worker_test.go index 822d202bd0..0d4f9be75b 100644 --- a/services/keepstore/pull_worker_test.go +++ b/services/keepstore/pull_worker_test.go @@ -245,7 +245,7 @@ func performTest(testData PullWorkerTestData, c *C) { processedPullLists := make(map[string]string) // Override GetContent to mock keepclient Get functionality - defer func(orig func(string, *keepclient.KeepClient)(io.ReadCloser, int64, string, error)) { + defer func(orig func(string, *keepclient.KeepClient) (io.ReadCloser, int64, string, error)) { GetContent = orig }(GetContent) GetContent = func(signedLocator string, keepClient *keepclient.KeepClient) (reader io.ReadCloser, contentLength int64, url string, err error) { @@ -264,7 +264,7 @@ func performTest(testData PullWorkerTestData, c *C) { } // Override PutContent to mock PutBlock functionality - defer func(orig func([]byte, string)(error)) { PutContent = orig }(PutContent) + defer func(orig func([]byte, string) error) { PutContent = orig }(PutContent) PutContent = func(content []byte, locator string) (err error) { if testData.put_error { err = errors.New("Error putting data") -- 2.39.5