mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
all: consistently use "%w" formatting in fmt.Errorf for wrapped errors
This commit is contained in:
parent
30c7269814
commit
2985077c35
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue