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

lint: Fix 2 sites failing a recently introduced golint check
This commit is contained in:
Damien Lespiau
2017-09-26 12:59:00 +01:00
committed by GitHub
2 changed files with 2 additions and 10 deletions

View File

@@ -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.

View File

@@ -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) {