Skip to content

Commit

Permalink
remove unnecessary conversion time duration
Browse files Browse the repository at this point in the history
  • Loading branch information
dzyanis committed Mar 16, 2022
1 parent b89bb06 commit 7f95f61
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions provider/otc/otc.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import (
"crypto/tls"
"encoding/json"
"fmt"
"github.com/messagebird/sachet"
"io"
"io/ioutil"
"net/http"
"time"

"github.com/messagebird/sachet"
)

type Config struct {
Expand Down Expand Up @@ -107,7 +108,7 @@ func (c *OTC) loginRequest() error {
tr := http.DefaultTransport.(*http.Transport)
tr.TLSClientConfig = &tls.Config{InsecureSkipVerify: c.Insecure}

client := &http.Client{Timeout: time.Duration(10 * time.Second), Transport: tr}
client := &http.Client{Timeout: 10 * time.Second, Transport: tr}
resp, err := client.Do(req)
if err != nil {
return err
Expand Down Expand Up @@ -189,7 +190,7 @@ func (c *OTC) SendRequest(method, resource string, payload *smsRequest, attempts
tr.TLSClientConfig = &tls.Config{InsecureSkipVerify: c.Insecure}

client := &http.Client{
Timeout: time.Duration(10 * time.Second),
Timeout: 10 * time.Second,
Transport: tr,
}
resp, err := client.Do(req)
Expand Down

0 comments on commit 7f95f61

Please sign in to comment.