Skip to content

Commit

Permalink
chore: gosimple
Browse files Browse the repository at this point in the history
Removed format for arguments that are already a string.

Ref: #42

Signed-off-by: Ryan Johnson <[email protected]>
  • Loading branch information
tenthirtyam committed Jan 24, 2025
1 parent a6677cf commit 0ef1347
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hcx/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (c *Client) doRequest(req *http.Request) (*http.Response, []byte, error) {

req.Header.Set("Accept", "application/json")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("x-hm-authorization", fmt.Sprintf("%s", c.Token))
req.Header.Set("x-hm-authorization", c.Token)

http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}

Expand Down Expand Up @@ -225,8 +225,9 @@ func (c *Client) doVmcRequest(req *http.Request) (*http.Response, []byte, error)
req.Header.Set("Content-Type", "application/json")

if c.HcxToken != "" {
req.Header.Set("x-hm-authorization", fmt.Sprintf("%s", c.HcxToken))
req.Header.Set("x-hm-authorization", c.HcxToken)
}

http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}

res, err := c.HTTPClient.Do(req)
Expand Down

0 comments on commit 0ef1347

Please sign in to comment.