From 9c18c2845027df4b77f6ac88df2a36180db131fa Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 20 May 2018 00:01:47 +0200 Subject: [PATCH] Fix some linter advices Signed-off-by: Knut Ahlers --- hydrant.go | 2 +- osm/osm.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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())