From 8e7c92be021b1750b91342b59a707a4bc763f23b Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 10 May 2011 12:56:40 -0700 Subject: [PATCH] gofmt only --- lib/go/camli/client/client.go | 4 ++-- lib/go/camli/client/config.go | 3 ++- lib/go/camli/client/enumerate.go | 2 +- lib/go/camli/client/get.go | 2 +- lib/go/camli/client/sync_test.go | 18 +++++++++--------- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/lib/go/camli/client/client.go b/lib/go/camli/client/client.go index dc2c304cc..bb1326d94 100644 --- a/lib/go/camli/client/client.go +++ b/lib/go/camli/client/client.go @@ -61,8 +61,8 @@ func (bb *ByCountAndBytes) String() string { func New(server, password string) *Client { return &Client{ - server: server, - password: password, + server: server, + password: password, httpClient: http.DefaultClient, } } diff --git a/lib/go/camli/client/config.go b/lib/go/camli/client/config.go index 5667a6464..f4511203b 100644 --- a/lib/go/camli/client/config.go +++ b/lib/go/camli/client/config.go @@ -41,6 +41,7 @@ func ConfigFilePath() string { var configOnce sync.Once var config = make(map[string]interface{}) + func parseConfig() { f, err := os.Open(ConfigFilePath()) switch { @@ -56,7 +57,7 @@ func parseConfig() { if err := dj.Decode(&config); err != nil { log.Printf("Error parsing JSON in config file %q: %v", ConfigFilePath(), err) } - } + } } func cleanServer(server string) string { diff --git a/lib/go/camli/client/enumerate.go b/lib/go/camli/client/enumerate.go index a950fc32c..f83e15b2b 100644 --- a/lib/go/camli/client/enumerate.go +++ b/lib/go/camli/client/enumerate.go @@ -25,7 +25,7 @@ import ( type EnumerateOpts struct { After string - MaxWaitSec int // max seconds to long poll for, waiting for any blob + MaxWaitSec int // max seconds to long poll for, waiting for any blob Limit uint // if non-zero, the max blobs to return } diff --git a/lib/go/camli/client/get.go b/lib/go/camli/client/get.go index 3dbeaa734..004c031e4 100644 --- a/lib/go/camli/client/get.go +++ b/lib/go/camli/client/get.go @@ -55,7 +55,7 @@ func (c *Client) FetchVia(b *blobref.BlobRef, v []*blobref.BlobRef) (io.ReadClos } buf.WriteString(br.String()) } - url = buf.String() + url = buf.String() } req := c.newRequest("GET", url) diff --git a/lib/go/camli/client/sync_test.go b/lib/go/camli/client/sync_test.go index 2eb75b49a..02b3c6956 100644 --- a/lib/go/camli/client/sync_test.go +++ b/lib/go/camli/client/sync_test.go @@ -61,15 +61,15 @@ func sendTestBlobs(ch chan *blobref.SizedBlobRef, list string) { func TestListMissingDestinationBlobs(t *testing.T) { tests := []lmdbTest{ - { "foo-a,foo-b,foo-c", "", "foo-a,foo-b,foo-c" }, - { "foo-a,foo-b,foo-c", "foo-a", "foo-b,foo-c" }, - { "foo-a,foo-b,foo-c", "foo-b", "foo-a,foo-c" }, - { "foo-a,foo-b,foo-c", "foo-c", "foo-a,foo-b" }, - { "foo-a,foo-b,foo-c", "foo-a,foo-b", "foo-c" }, - { "foo-a,foo-b,foo-c", "foo-b,foo-c", "foo-a" }, - { "foo-a,foo-b,foo-c", "foo-a,foo-b,foo-c", "" }, - { "", "foo-a,foo-b,foo-c", "" }, - { "foo-f", "foo-a,foo-b,foo-c", "foo-f" }, + {"foo-a,foo-b,foo-c", "", "foo-a,foo-b,foo-c"}, + {"foo-a,foo-b,foo-c", "foo-a", "foo-b,foo-c"}, + {"foo-a,foo-b,foo-c", "foo-b", "foo-a,foo-c"}, + {"foo-a,foo-b,foo-c", "foo-c", "foo-a,foo-b"}, + {"foo-a,foo-b,foo-c", "foo-a,foo-b", "foo-c"}, + {"foo-a,foo-b,foo-c", "foo-b,foo-c", "foo-a"}, + {"foo-a,foo-b,foo-c", "foo-a,foo-b,foo-c", ""}, + {"", "foo-a,foo-b,foo-c", ""}, + {"foo-f", "foo-a,foo-b,foo-c", "foo-f"}, } for _, test := range tests {