diff --git a/hydrant.go b/hydrant.go index 3906d0d..1a6c642 100644 --- a/hydrant.go +++ b/hydrant.go @@ -106,7 +106,7 @@ func fromNode(in *osm.Node) (*hydrant, error) { } 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 diff --git a/osm/osm.go b/osm/osm.go index 35752e9..febb3fc 100644 --- a/osm/osm.go +++ b/osm/osm.go @@ -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) { - var reqBodyBuffer *bytes.Buffer = nil + var reqBodyBuffer *bytes.Buffer if body != nil { - reqBodyBuffer = bytes.NewBufferString("") + reqBodyBuffer = new(bytes.Buffer) io.Copy(reqBodyBuffer, body) body = bytes.NewBuffer(reqBodyBuffer.Bytes())