6260: gofmt
authorTom Clegg <tom@curoverse.com>
Thu, 6 Aug 2015 03:38:12 +0000 (23:38 -0400)
committerTom Clegg <tom@curoverse.com>
Mon, 10 Aug 2015 16:44:52 +0000 (12:44 -0400)
services/keepstore/handlers.go
services/keepstore/perms_test.go
services/keepstore/pull_worker_integration_test.go
services/keepstore/pull_worker_test.go

index d1169d5df9ce5549cdfd4f5a56fb095ad12cc8f6..c4ecfb4c88b66dacccc9904c4ea9da5a64631a64 100644 (file)
@@ -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)
index 85883b03a7d33a416947d823957f1ec1a3ffac7d..e43cb8dcd99bf39d4318153525b4f46c660239ce 100644 (file)
@@ -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")
        }
 
index 762abff533213747b16562b5a6127b0efa4203f2..3e57407369c0dccf8216e3e0835820c0bc419b55 100644 (file)
@@ -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 != "" {
index 822d202bd07dea4a4ebb50bb18b91dcda5682a91..0d4f9be75beeac7b05141f1bac26be796ba9e94b 100644 (file)
@@ -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")