mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-26 12:57:44 +08:00
fix error handling
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
parent
5a1a03bd8f
commit
2e8ead8df1
@ -118,9 +118,13 @@ Print out all dependencies and their versions.`,
|
||||
}
|
||||
return
|
||||
}
|
||||
res.Emit(toDependency(&info.Main))
|
||||
if err := res.Emit(toDependency(&info.Main)); err != nil {
|
||||
return err
|
||||
}
|
||||
for _, dep := range info.Deps {
|
||||
res.Emit(toDependency(dep))
|
||||
if err := res.Emit(toDependency(dep)); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
},
|
||||
@ -131,7 +135,7 @@ Print out all dependencies and their versions.`,
|
||||
fmt.Fprintf(w, " => %s", dep.ReplacedBy)
|
||||
}
|
||||
fmt.Fprintf(w, "\n")
|
||||
return errors.New("test")
|
||||
return nil
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user