mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Fix some errcheck errors (#9811)
* Throw away result of multierror.Append When given a *multierror.Error, it is mutated, therefore the return value is not needed. * Simplify MergeMultierrorWarnings, use StringBuilder * Hash.Write() never returns an error * Remove error that was always nil * Remove error from Resources.Add signature When this was originally written it could return an error, but that was refactored away, and callers of it as of today never handle the error. * Throw away results of io.Copy during Bridge * Handle errors when computing node class in test
This commit is contained in:
@@ -283,13 +283,13 @@ func (m *manager) cleanupStalePlugins() error {
|
||||
for name, c := range s.ReattachConfigs {
|
||||
rc, err := pstructs.ReattachConfigToGoPlugin(c)
|
||||
if err != nil {
|
||||
multierror.Append(&mErr, fmt.Errorf("failed to convert reattach config: %v", err))
|
||||
_ = multierror.Append(&mErr, fmt.Errorf("failed to convert reattach config: %v", err))
|
||||
continue
|
||||
}
|
||||
|
||||
instance, err := m.loader.Reattach(name, base.PluginTypeDevice, rc)
|
||||
if err != nil {
|
||||
multierror.Append(&mErr, fmt.Errorf("failed to reattach to plugin %q: %v", name, err))
|
||||
_ = multierror.Append(&mErr, fmt.Errorf("failed to reattach to plugin %q: %v", name, err))
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user