mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-05 11:11:13 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user