top | item 19780377 (no title) BarkMore | 6 years ago The go vet command checks format strings. I expect that the command will be updated to check for correct use of %w. discuss order hn newest scrollaway|6 years ago What's the point of making it a format string if you are hardcoding where the % identifier goes anyway?! secure|6 years 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) load replies (1) greenleafjacob|6 years ago forward compatibility?
scrollaway|6 years ago What's the point of making it a format string if you are hardcoding where the % identifier goes anyway?! secure|6 years 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) load replies (1) greenleafjacob|6 years ago forward compatibility?
secure|6 years 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) load replies (1)
scrollaway|6 years ago
secure|6 years ago
greenleafjacob|6 years ago