Skip to content

Commit

Permalink
Use fmt.Errorf instead of errors.New(fmt.Sprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-slynko committed Dec 6, 2017
1 parent e8536d8 commit a299f56
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/spec_iterator/parallel_spec_iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package spec_iterator

import (
"encoding/json"
"errors"
"fmt"
"net/http"

Expand Down Expand Up @@ -31,7 +30,7 @@ func (s *ParallelIterator) Next() (*spec.Spec, error) {
defer resp.Body.Close()

if resp.StatusCode != http.StatusOK {
return nil, errors.New(fmt.Sprintf("unexpected status code %d", resp.StatusCode))
return nil, fmt.Errorf("unexpected status code %d", resp.StatusCode)
}

var counter Counter
Expand Down

0 comments on commit a299f56

Please sign in to comment.