mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-05 04:55:22 +00:00
Enable errcheck linter and resolve found issues.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
This commit is contained in:
@@ -87,7 +87,9 @@ func (c *ObjectStoreGRPCClient) PutObject(bucket, key string, body io.Reader) er
|
||||
return nil
|
||||
}
|
||||
if err != nil {
|
||||
stream.CloseSend()
|
||||
if err := stream.CloseSend(); err != nil {
|
||||
return common.FromGRPCError(err)
|
||||
}
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
|
||||
|
||||
@@ -232,7 +232,10 @@ func getNames(command string, kind common.PluginKind, plugin Interface) []Plugin
|
||||
func (s *server) Serve() {
|
||||
if s.flagSet != nil && !s.flagSet.Parsed() {
|
||||
s.log.Debugf("Parsing flags")
|
||||
s.flagSet.Parse(os.Args[1:])
|
||||
if err := s.flagSet.Parse(os.Args[1:]); err != nil {
|
||||
s.log.Errorf("fail to parse the flags: %s", err.Error())
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
s.log.Level = s.logLevelFlag.Parse()
|
||||
|
||||
Reference in New Issue
Block a user