1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-03 21:08:17 +08:00

go-vet friendly codebase

- distinguish log.Error and log.Errorf functions
- Initialize structs with field names
- A bit of unreachable code (defers)
This commit is contained in:
Juan Batiz-Benet
2014-10-25 03:17:14 -07:00
parent 210b5df78c
commit 184c25430b
38 changed files with 187 additions and 188 deletions

View File

@ -73,8 +73,8 @@ func TestOptionValidation(t *testing.T) {
req = NewEmptyRequest()
req.SetOption("b", ":)")
res = cmd.Call(req)
if res.Error == nil {
t.Error(res.Error, "Should have failed (string value not convertible to int)")
if res.Error() == nil {
t.Error(res.Error(), "Should have failed (string value not convertible to int)")
}
}