1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 11:31:54 +08:00

fix a bunch of go vet errors

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
Steven Allen
2018-02-20 17:37:35 -08:00
parent 868855f625
commit 45756b6d64
8 changed files with 26 additions and 12 deletions

View File

@ -111,8 +111,6 @@ func (api *BlockAPI) Rm(ctx context.Context, p coreiface.Path, opts ...caopts.Bl
case <-ctx.Done():
return ctx.Err()
}
return nil
}
func (api *BlockAPI) Stat(ctx context.Context, p coreiface.Path) (coreiface.BlockStat, error) {

View File

@ -268,7 +268,7 @@ func TestObjectAddLinkCreate(t *testing.T) {
t.Fatal("expected an error")
}
if err.Error() != "no link by that name" {
t.Fatal("unexpected error: %s", err.Error())
t.Fatalf("unexpected error: %s", err.Error())
}
p3, err = api.Object().AddLink(ctx, p2, "abc/d", p2, api.Object().WithCreate(true))

View File

@ -71,7 +71,7 @@ func (api *UnixfsAPI) Ls(ctx context.Context, p coreiface.Path) ([]*coreiface.Li
links := make([]*coreiface.Link, len(ndlinks))
for i, l := range ndlinks {
links[i] = &coreiface.Link{l.Name, l.Size, l.Cid}
links[i] = &coreiface.Link{Name: l.Name, Size: l.Size, Cid: l.Cid}
}
return links, nil
}