mirror of https://github.com/perkeep/perkeep.git
gofmt only
This commit is contained in:
parent
7169c6d5bc
commit
8e7c92be02
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue