Skip to content

Commit

Permalink
update regex to a more simple one as suggested in the PR
Browse files Browse the repository at this point in the history
  • Loading branch information
dikhan committed Sep 11, 2018
1 parent 35130ab commit 53865f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openapi/resource_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ func (r resourceInfo) getResourceTimeout(operation *spec.Operation) (*time.Durat

func (r resourceInfo) getTimeDuration(extensions spec.Extensions, extension string) (*time.Duration, error) {
if value, exists := extensions.GetString(extension); exists {
regex, err := regexp.Compile("^[\\d]+([\\.]{1}[\\d]+)?[smh]{1}$")
regex, err := regexp.Compile("^\\d+(\\.\\d+)?[smh]{1}$")
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 53865f5

Please sign in to comment.