Skip to content

Commit

Permalink
chore(linting): fixed unnessary use of fmt.Errorf
Browse files Browse the repository at this point in the history
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
  • Loading branch information
fredbi committed Feb 17, 2024
1 parent 59dbfa2 commit 6729407
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion format.go
Expand Up @@ -16,6 +16,7 @@ package strfmt

import (
"encoding"
stderrors "errors"
"fmt"
"reflect"
"strings"
Expand Down Expand Up @@ -117,7 +118,7 @@ func (f *defaultFormats) MapStructureHookFunc() mapstructure.DecodeHookFunc {
case "datetime":
input := data
if len(input) == 0 {
return nil, fmt.Errorf("empty string is an invalid datetime format")
return nil, stderrors.New("empty string is an invalid datetime format")
}
return ParseDateTime(input)
case "duration":
Expand Down

0 comments on commit 6729407

Please sign in to comment.