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