Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Commit

Permalink
Use errs.Errorf instead of fmt.Errorf
Browse files Browse the repository at this point in the history
  • Loading branch information
jarifibrahim committed Oct 8, 2018
1 parent ec7ace0 commit 5512f13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions workitem/enum_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ func (t EnumType) ConvertFromModel(value interface{}) (interface{}, error) {
}
converted, err := t.BaseType.ConvertFromModel(value)
if err != nil {
return nil, fmt.Errorf("error converting enum value: %s", err.Error())
return nil, errs.Errorf("error converting enum value: %s", err.Error())
}
if !contains(t.Values, converted) {
return nil, fmt.Errorf("value: %+v (%[1]T) is not part of allowed enum values: %+v", value, t.Values)
return nil, errs.Errorf("value: %+v (%[1]T) is not part of allowed enum values: %+v", value, t.Values)
}
return converted, nil
}

0 comments on commit 5512f13

Please sign in to comment.