mirror of
https://github.com/docker/cli.git
synced 2026-01-13 18:22:35 +03:00
The errors.Wrap and errors.Wrapf functions gracefully handle nil-errors. This allows them to be used unconditionally regardless if an error was produced. While this can be convenient, it can also be err-prone, as replacing these with stdlib errors means they unconditionally produce an error. This patch replaces code uses of errors.Wrap to be gated by a check for nil-errors to future-proof our code. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>