all: consistently use "%w" formatting in fmt.Errorf for wrapped errors

This commit is contained in:
Aliaksandr Valialkin 2020-09-23 22:46:24 +03:00
parent 30c7269814
commit 2985077c35
2 changed files with 2 additions and 2 deletions

View file

@ -41,7 +41,7 @@ func (g *Group) UnmarshalYAML(unmarshal func(interface{}) error) error {
}
b, err := yaml.Marshal(g)
if err != nil {
return fmt.Errorf("failed to marshal group configuration for checksum: %s", err)
return fmt.Errorf("failed to marshal group configuration for checksum: %w", err)
}
h := md5.New()
h.Write(b)

View file

@ -114,7 +114,7 @@ func TestParseARNCredentialsSuccess(t *testing.T) {
func mustParseRFC3339(s string) time.Time {
expTime, err := time.Parse(time.RFC3339, s)
if err != nil {
panic(fmt.Errorf("unexpected error when parsing time from %q: %s", s, err))
panic(fmt.Errorf("unexpected error when parsing time from %q: %w", s, err))
}
return expTime
}