Skip to content

Commit 00778a6

Browse files
committed
Replace ioutil.Discard with io.Discard
"io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package [io] or package [os], and those implementations should be preferred in new code. See the specific function documentation for details. (SA1019)
1 parent 44e617e commit 00778a6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

servicedesk.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"encoding/json"
66
"fmt"
77
"io"
8-
"io/ioutil"
98

109
"github.com/google/go-querystring/query"
1110
)
@@ -144,7 +143,7 @@ func (s *ServiceDeskService) AddCustomersWithContext(ctx context.Context, servic
144143
}
145144

146145
defer resp.Body.Close()
147-
_, _ = io.Copy(ioutil.Discard, resp.Body)
146+
_, _ = io.Copy(io.Discard, resp.Body)
148147

149148
return resp, nil
150149
}
@@ -176,7 +175,7 @@ func (s *ServiceDeskService) RemoveCustomersWithContext(ctx context.Context, ser
176175
}
177176

178177
defer resp.Body.Close()
179-
_, _ = io.Copy(ioutil.Discard, resp.Body)
178+
_, _ = io.Copy(io.Discard, resp.Body)
180179

181180
return resp, nil
182181
}

0 commit comments

Comments
 (0)