Hacker News new | ask | show | jobs
by secure 2605 days ago
The %w (or %v) identifier must be at the end for the magic to work, but you can still meaningfully format things in front of the wrapped error, e.g. fmt.Errorf("Write(%s): %w", filename, err)
1 comments

Why does it need to be at the end?