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
265d892a8c
commit
543f3aea97
3 changed files with 3 additions and 3 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)
|
||||
|
|
|
@ -724,7 +724,7 @@ func (s *Server) processVMSelectTagValueSuffixes(ctx *vmselectRequestCtx) error
|
|||
tagValuePrefix := append([]byte{}, ctx.dataBuf...)
|
||||
delimiter, err := ctx.readByte()
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot read delimiter: %s", err)
|
||||
return fmt.Errorf("cannot read delimiter: %w", err)
|
||||
}
|
||||
|
||||
// Search for tag value suffixes
|
||||
|
|
|
@ -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