Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-ogrady committed Sep 30, 2020
1 parent 52a975a commit 4972b54
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ADDLICENCE_SCRIPT=${ADDLICENSE_CMD} -c "Coinbase, Inc." -l "apache" -v
GOLINES_CMD=go run github.com/segmentio/golines
GOVERALLS_CMD=go run github.com/mattn/goveralls
COVERAGE_TEST_DIRECTORIES=./configuration/... ./pkg/constructor/... \
./pkg/logger/... ./pkg/scenario/... ./pkg/results/...
./pkg/logger/... ./pkg/scenario/...
TEST_SCRIPT=go test -v ./pkg/... ./configuration/...
COVERAGE_TEST_SCRIPT=go test -v ${COVERAGE_TEST_DIRECTORIES}

Expand Down
4 changes: 2 additions & 2 deletions pkg/results/construction_results.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ func ComputeCheckConstructionStatus(
}

// FetchCheckConstructionStatus fetches *CheckConstructionStatus.
func FetchCheckConstructionStatus(URL string) (*CheckConstructionStatus, error) {
func FetchCheckConstructionStatus(url string) (*CheckConstructionStatus, error) {
var status CheckConstructionStatus
if err := JSONFetch(URL, &status); err != nil {
if err := JSONFetch(url, &status); err != nil {
return nil, fmt.Errorf("%w: unable to fetch construction status", err)
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/results/data_results.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ func ComputeCheckDataStatus(
}

// FetchCheckDataStatus fetches *CheckDataStatus.
func FetchCheckDataStatus(URL string) (*CheckDataStatus, error) {
func FetchCheckDataStatus(url string) (*CheckDataStatus, error) {
var status CheckDataStatus
if err := JSONFetch(URL, &status); err != nil {
if err := JSONFetch(url, &status); err != nil {
return nil, fmt.Errorf("%w: unable to fetch construction status", err)
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/results/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (

// JSONFetch makes a GET request to the URL and marshals
// the response into output.
func JSONFetch(URL string, output interface{}) error {
resp, err := http.Get(URL)
func JSONFetch(url string, output interface{}) error {
resp, err := http.Get(url) // #nosec
if err != nil {
return fmt.Errorf("%w: unable to fetch GET %s", err, URL)
return fmt.Errorf("%w: unable to fetch GET %s", err, url)
}
defer resp.Body.Close()

Expand Down

0 comments on commit 4972b54

Please sign in to comment.