Total Lines | 14 |
Duplicated Lines | 0 % |
Coverage | 80% |
Changes | 0 |
1 | package devto |
||
2 | |||
3 | import ( |
||
4 | "io/ioutil" |
||
5 | "net/http" |
||
6 | ) |
||
7 | |||
8 | func decodeResponse(r *http.Response) []byte { |
||
9 | 1 | c, err := ioutil.ReadAll(r.Body) |
|
10 | 1 | if err != nil { |
|
11 | return []byte("") |
||
12 | } |
||
13 | 1 | defer r.Body.Close() |
|
14 | 1 | return c |
|
15 | } |
||
16 |