Commit c74e683a authored by Damien Lespiau's avatar Damien Lespiau Committed by GitHub
Browse files

Merge pull request #2868 from weaveworks/2017-09-26-golint-update

lint: Fix 2 sites failing a recently introduced golint check
Showing with 2 additions and 10 deletions
+2 -10
......@@ -66,10 +66,7 @@ func (c *consulClient) Get(key string, out interface{}) error {
if kvp == nil {
return ErrNotFound
}
if err := json.NewDecoder(bytes.NewReader(kvp.Value)).Decode(out); err != nil {
return err
}
return nil
return json.NewDecoder(bytes.NewReader(kvp.Value)).Decode(out)
}
// CAS atomically modify a value in a callback.
......
......@@ -185,12 +185,7 @@ func (rep *Report) WriteToFile(path string, compressionLevel int) error {
w = gzwriter
}
if err = codec.NewEncoder(w, handle).Encode(rep); err != nil {
return err
}
return nil
return codec.NewEncoder(w, handle).Encode(rep)
}
func handlerFromFileType(path string) (codec.Handle, bool, error) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment