Skip to content

Commit

Permalink
Merge pull request #2868 from weaveworks/2017-09-26-golint-update
Browse files Browse the repository at this point in the history
lint: Fix 2 sites failing a recently introduced golint check
  • Loading branch information
dlespiau authored Sep 26, 2017
2 parents a3803cb + 466927c commit c74e683
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
5 changes: 1 addition & 4 deletions app/multitenant/consul_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 1 addition & 6 deletions report/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c74e683

Please sign in to comment.