From 7c2442f3a2104154e145156867a9c86054e0ac63 Mon Sep 17 00:00:00 2001 From: Corey Scott Date: Wed, 2 May 2018 09:35:19 +1000 Subject: [PATCH 1/2] Fix formatting only --- hystrix/circuit_test.go | 5 ++--- hystrix/hystrix_test.go | 3 +-- hystrix/metric_collector/mocks/metric_collector.go | 7 +++++-- hystrix/pool_test.go | 3 +-- plugins/graphite_aggregator.go | 1 - plugins/mocks/datadog_client.go | 4 +++- plugins/mocks/statsd_collector.go | 9 ++++++--- plugins/statsd_collector_test.go | 3 +-- 8 files changed, 19 insertions(+), 16 deletions(-) diff --git a/hystrix/circuit_test.go b/hystrix/circuit_test.go index 9f6ba54..2b652dd 100644 --- a/hystrix/circuit_test.go +++ b/hystrix/circuit_test.go @@ -1,13 +1,12 @@ package hystrix import ( + "math/rand" "sync" "sync/atomic" "testing" - "time" - - "math/rand" "testing/quick" + "time" . "github.com/smartystreets/goconvey/convey" ) diff --git a/hystrix/hystrix_test.go b/hystrix/hystrix_test.go index d7c4cfb..80cd1eb 100644 --- a/hystrix/hystrix_test.go +++ b/hystrix/hystrix_test.go @@ -2,11 +2,10 @@ package hystrix import ( "fmt" + "sync/atomic" "testing" "time" - "sync/atomic" - . "github.com/smartystreets/goconvey/convey" ) diff --git a/hystrix/metric_collector/mocks/metric_collector.go b/hystrix/metric_collector/mocks/metric_collector.go index 688b9c4..ecfce2a 100644 --- a/hystrix/metric_collector/mocks/metric_collector.go +++ b/hystrix/metric_collector/mocks/metric_collector.go @@ -1,8 +1,11 @@ // Code generated by mockery v1.0.0 package mocks -import mock "github.com/stretchr/testify/mock" -import time "time" +import ( + "time" + + "github.com/stretchr/testify/mock" +) // MetricCollector is an autogenerated mock type for the MetricCollector type type MetricCollector struct { diff --git a/hystrix/pool_test.go b/hystrix/pool_test.go index eef4577..acdda74 100644 --- a/hystrix/pool_test.go +++ b/hystrix/pool_test.go @@ -1,11 +1,10 @@ package hystrix import ( + "sync/atomic" "testing" "time" - "sync/atomic" - . "github.com/smartystreets/goconvey/convey" ) diff --git a/plugins/graphite_aggregator.go b/plugins/graphite_aggregator.go index 7772f9b..b3f1a38 100644 --- a/plugins/graphite_aggregator.go +++ b/plugins/graphite_aggregator.go @@ -8,7 +8,6 @@ import ( "time" "github.com/myteksi/hystrix-go/hystrix/metric_collector" - "github.com/rcrowley/go-metrics" ) var makeTimerFunc = func() interface{} { return metrics.NewTimer() } diff --git a/plugins/mocks/datadog_client.go b/plugins/mocks/datadog_client.go index f6b6d0f..22c9ae9 100644 --- a/plugins/mocks/datadog_client.go +++ b/plugins/mocks/datadog_client.go @@ -1,7 +1,9 @@ // Code generated by mockery v1.0.0 package mocks -import mock "github.com/stretchr/testify/mock" +import ( + "github.com/stretchr/testify/mock" +) // DatadogClient is an autogenerated mock type for the DatadogClient type type DatadogClient struct { diff --git a/plugins/mocks/statsd_collector.go b/plugins/mocks/statsd_collector.go index a488675..3f49742 100644 --- a/plugins/mocks/statsd_collector.go +++ b/plugins/mocks/statsd_collector.go @@ -1,9 +1,12 @@ // Code generated by mockery v1.0.0 package mocks -import mock "github.com/stretchr/testify/mock" -import statsd "github.com/cactus/go-statsd-client/statsd" -import time "time" +import ( + "time" + + "github.com/cactus/go-statsd-client/statsd" + "github.com/stretchr/testify/mock" +) // Statter is an autogenerated mock type for the Statter type type Statter struct { diff --git a/plugins/statsd_collector_test.go b/plugins/statsd_collector_test.go index 1173682..1675f9e 100644 --- a/plugins/statsd_collector_test.go +++ b/plugins/statsd_collector_test.go @@ -1,9 +1,8 @@ package plugins import ( - "testing" - "sync/atomic" + "testing" "github.com/myteksi/hystrix-go/plugins/mocks" . "github.com/smartystreets/goconvey/convey" From e3544b47d775ec2132c98fc5fe60df07003eb181 Mon Sep 17 00:00:00 2001 From: Corey Scott Date: Wed, 2 May 2018 09:45:24 +1000 Subject: [PATCH 2/2] Fix incorrect removal of import --- plugins/graphite_aggregator.go | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/graphite_aggregator.go b/plugins/graphite_aggregator.go index b3f1a38..17ad6bc 100644 --- a/plugins/graphite_aggregator.go +++ b/plugins/graphite_aggregator.go @@ -8,6 +8,7 @@ import ( "time" "github.com/myteksi/hystrix-go/hystrix/metric_collector" + metrics "github.com/rcrowley/go-metrics" ) var makeTimerFunc = func() interface{} { return metrics.NewTimer() }