1
0
Fork 0
mirror of https://github.com/Luzifer/gpxhydrant.git synced 2024-11-08 15:30:00 +00:00

Fix some linter advices

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-05-20 00:01:47 +02:00
parent 8aa133b2ac
commit 9c18c28450
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
2 changed files with 3 additions and 3 deletions

View file

@ -106,7 +106,7 @@ func fromNode(in *osm.Node) (*hydrant, error) {
} }
if !validFireHydrant { if !validFireHydrant {
return nil, fmt.Errorf("Did not find required 'emergency=fire_hydrant' tag.") return nil, fmt.Errorf("did not find required 'emergency=fire_hydrant' tag")
} }
return out, nil return out, nil

View file

@ -70,9 +70,9 @@ func (c *Client) doPlain(method, path string, body io.Reader) (string, error) {
} }
func (c *Client) do(method, path string, body io.Reader) (io.ReadCloser, error) { func (c *Client) do(method, path string, body io.Reader) (io.ReadCloser, error) {
var reqBodyBuffer *bytes.Buffer = nil var reqBodyBuffer *bytes.Buffer
if body != nil { if body != nil {
reqBodyBuffer = bytes.NewBufferString("") reqBodyBuffer = new(bytes.Buffer)
io.Copy(reqBodyBuffer, body) io.Copy(reqBodyBuffer, body)
body = bytes.NewBuffer(reqBodyBuffer.Bytes()) body = bytes.NewBuffer(reqBodyBuffer.Bytes())