* 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
14 lines
288 B
Go
14 lines
288 B
Go
package client
|
|
|
|
import (
|
|
"io"
|
|
|
|
"github.com/BBVA/kapow/internal/http"
|
|
)
|
|
|
|
// GetData will perform the request and write the results on the provided writer
|
|
func GetData(host, id, path string, w io.Writer) error {
|
|
url := host + "/handlers/" + id + path
|
|
return http.Get(url, "", nil, w)
|
|
}
|