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:
@ -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) {
|
||||
|
@ -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))
|
||||
|
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user