Passed
Push — master ( 51e7b4...b93986 )
by Victor Hugo
02:20 queued 01:11
created

devto/utilities.go   A

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 80%

Importance

Changes 0
Metric Value
cc 2
eloc 10
dl 0
loc 14
ccs 4
cts 5
cp 0.8
crap 2.032
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A devto.decodeResponse 0 7 2
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