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
parents a3803cb2 466927ce
No related merge requests found
Showing with 2 additions and 10 deletions
+2 -10
...@@ -66,10 +66,7 @@ func (c *consulClient) Get(key string, out interface{}) error { ...@@ -66,10 +66,7 @@ func (c *consulClient) Get(key string, out interface{}) error {
if kvp == nil { if kvp == nil {
return ErrNotFound return ErrNotFound
} }
if err := json.NewDecoder(bytes.NewReader(kvp.Value)).Decode(out); err != nil { return json.NewDecoder(bytes.NewReader(kvp.Value)).Decode(out)
return err
}
return nil
} }
// CAS atomically modify a value in a callback. // CAS atomically modify a value in a callback.
......
...@@ -185,12 +185,7 @@ func (rep *Report) WriteToFile(path string, compressionLevel int) error { ...@@ -185,12 +185,7 @@ func (rep *Report) WriteToFile(path string, compressionLevel int) error {
w = gzwriter w = gzwriter
} }
if err = codec.NewEncoder(w, handle).Encode(rep); err != nil { return codec.NewEncoder(w, handle).Encode(rep)
return err
}
return nil
} }
func handlerFromFileType(path string) (codec.Handle, bool, error) { 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