Normalize internal/client/*_test.go

* Adjust test style for easy reading, by using literals instead of vars
* Move comparison to the `bytes` domain, instead of `string`
* Simplify testing code by using bytes.Buffer directly
* More consistent naming of variables and dummies (HANDLE_{FOO,BAR,BAD})
* Consistent testing style of gock.IsDone()
* Stick to 80-column
This commit is contained in:
pancho horrillo
2019-10-06 09:41:12 +02:00
parent 25409a2cee
commit f98784088d
6 changed files with 78 additions and 92 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ import (
)
// GetData will perform the request and write the results on the provided writer
func GetData(host, id, path string, wr io.Writer) error {
func GetData(host, id, path string, w io.Writer) error {
url := host + "/handlers/" + id + path
return http.Get(url, "", nil, wr)
return http.Get(url, "", nil, w)
}