diff --git a/gateway/handlers/alerthandler.go b/gateway/handlers/alerthandler.go index 631b32f3..716dab1d 100644 --- a/gateway/handlers/alerthandler.go +++ b/gateway/handlers/alerthandler.go @@ -131,4 +131,4 @@ func CalculateReplicas(status string, currentReplicas uint64, maxReplicas uint64 newReplicas = minReplicas } return newReplicas -} \ No newline at end of file +} diff --git a/gateway/handlers/alerthandler_test.go b/gateway/handlers/alerthandler_test.go index b74c54d7..dc1c2c04 100644 --- a/gateway/handlers/alerthandler_test.go +++ b/gateway/handlers/alerthandler_test.go @@ -17,7 +17,7 @@ func TestDisabledScale(t *testing.T) { } } -func TestParameterEdge(t *testing.T){ +func TestParameterEdge(t *testing.T) { minReplicas := uint64(0) scalingFactor := uint64(0) newReplicas := CalculateReplicas("firing", DefaultMinReplicas, DefaultMaxReplicas, minReplicas, scalingFactor) @@ -27,7 +27,7 @@ func TestParameterEdge(t *testing.T){ } } -func TestMaxScale(t *testing.T){ +func TestMaxScale(t *testing.T) { minReplicas := uint64(1) scalingFactor := uint64(100) newReplicas := CalculateReplicas("firing", DefaultMinReplicas, DefaultMaxReplicas, minReplicas, scalingFactor) @@ -85,4 +85,4 @@ func TestBackingOff(t *testing.T) { t.Log("Expected backing off to 1 replica") t.Fail() } -} \ No newline at end of file +} diff --git a/gateway/handlers/service_query.go b/gateway/handlers/service_query.go index e98fff30..c0568447 100644 --- a/gateway/handlers/service_query.go +++ b/gateway/handlers/service_query.go @@ -11,6 +11,6 @@ type ServiceQueryResponse struct { Replicas uint64 MaxReplicas uint64 MinReplicas uint64 - ScalingFactor uint64 + ScalingFactor uint64 AvailableReplicas uint64 } diff --git a/gateway/plugin/external.go b/gateway/plugin/external.go index d1f56cbb..c806e541 100644 --- a/gateway/plugin/external.go +++ b/gateway/plugin/external.go @@ -149,7 +149,7 @@ func (s ExternalServiceQuery) SetReplicas(serviceName string, count uint64) erro // extractLabelValue will parse the provided raw label value and if it fails // it will return the provided fallback value and log an message -func extractLabelValue(rawLabelValue string, fallback uint64 ) uint64{ +func extractLabelValue(rawLabelValue string, fallback uint64) uint64 { if len(rawLabelValue) <= 0 { return fallback } @@ -162,4 +162,4 @@ func extractLabelValue(rawLabelValue string, fallback uint64 ) uint64{ } return uint64(value) -} \ No newline at end of file +} diff --git a/gateway/plugin/external_test.go b/gateway/plugin/external_test.go index 56623960..c2698ab3 100644 --- a/gateway/plugin/external_test.go +++ b/gateway/plugin/external_test.go @@ -29,4 +29,4 @@ func TestLabelValueWasInValid(t *testing.T) { t.Log("Expected extractedValue to equal the fallbackValue") t.Fail() } -} \ No newline at end of file +}