Skip to content

Commit

Permalink
fix golangci-lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
shijl0925 authored Sep 6, 2024
1 parent 6d8b7e4 commit 4b18412
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions request.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,9 @@ func (r *Requester) NewRequest(ctx context.Context, method, endpoint string, opt

func (r *Requester) Do(req *http.Request, v interface{}) (*http.Response, error) {
isText := false
if v != nil {
if _, ok := v.(*string); ok {
req.Header.Set("Accept", "text/plain")
isText = true
}
if _, ok := v.(*string); ok {
req.Header.Set("Accept", "text/plain")
isText = true
}

resp, err := r.client.Do(req)
Expand Down

0 comments on commit 4b18412

Please sign in to comment.