3 ms·
This problem has been addressed in Go 1.13 with wrapped errors. If you get an error from a filesystem operation, you can return fmt.Errorf("ListThings failed
by majewsky 6y ago
This problem has been addressed in Go 1.13 with wrapped errors. If you get an error from a filesystem operation, you can
return fmt.Errorf("ListThings failed: %w", err)
which is a different error type, but the caller can downcast it into the original filesystem error type (even across multiple layers of wrapping) if they're interested in specifically these types of errors.