From 4972b5461bf6d90d322a4a811d61ff4e47726136 Mon Sep 17 00:00:00 2001 From: Patrick O'Grady Date: Tue, 29 Sep 2020 22:46:43 -0700 Subject: [PATCH] nits --- Makefile | 2 +- pkg/results/construction_results.go | 4 ++-- pkg/results/data_results.go | 4 ++-- pkg/results/utils.go | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 6adfc678..9a5416cc 100644 --- a/Makefile +++ b/Makefile @@ -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} diff --git a/pkg/results/construction_results.go b/pkg/results/construction_results.go index 9cd9a07d..50139b68 100644 --- a/pkg/results/construction_results.go +++ b/pkg/results/construction_results.go @@ -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) } diff --git a/pkg/results/data_results.go b/pkg/results/data_results.go index b2db460d..2422946b 100644 --- a/pkg/results/data_results.go +++ b/pkg/results/data_results.go @@ -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) } diff --git a/pkg/results/utils.go b/pkg/results/utils.go index 9e6d3278..d9eeef41 100644 --- a/pkg/results/utils.go +++ b/pkg/results/utils.go @@ -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()