Skip to content

Commit

Permalink
Accept a duration rather than a number of seconds for service timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisrollins65 committed Jun 13, 2024
1 parent 54bb0d1 commit 4495b50
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vat.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ var ViesLookupService LookupServiceInterface = &viesService{}
// UKVATLookupService is the interface for the UK VAT number validation service
var UKVATLookupService LookupServiceInterface = &ukVATService{}

var serviceTimeout = time.Duration(60) * time.Second
var serviceTimeout = time.Second * 60

// SetServiceTimeout sets the timeout in seconds for the external VAT lookup services.
func SetServiceTimeout(seconds int) {
serviceTimeout = time.Duration(seconds) * time.Second
// SetServiceTimeout sets the timeout for the external VAT lookup services.
func SetServiceTimeout(timeout time.Duration) {
serviceTimeout = timeout
}

0 comments on commit 4495b50

Please sign in to comment.