@@ -71,7 +71,7 @@ func TestCounter(t *testing.T, factory monitoring.MetricFactory) {
7171 // Use a different set of label values
7272 // Metrics with different valued label values, are distinct
7373 // This test is only applicable when a Metric has labels
74- if test . labelVals != nil && len (test .labelVals ) >= 1 {
74+ if len (test .labelVals ) >= 1 {
7575 altLabels := make ([]string , len (test .labelVals ))
7676 copy (altLabels , test .labelVals )
7777 altLabels [0 ] = "alt-val1"
@@ -151,7 +151,7 @@ func TestGauge(t *testing.T, factory monitoring.MetricFactory) {
151151 // Use a different set of label values
152152 // Metrics with different valued label values, are distinct
153153 // This test is only applicable when a Metric has labels
154- if test . labelVals != nil && len (test .labelVals ) >= 1 {
154+ if len (test .labelVals ) >= 1 {
155155 altLabels := make ([]string , len (test .labelVals ))
156156 copy (altLabels , test .labelVals )
157157 altLabels [0 ] = "alt-val1"
@@ -223,7 +223,7 @@ func TestHistogram(t *testing.T, factory monitoring.MetricFactory) {
223223 // Use a different set of label values
224224 // Metrics with different valued label values, are distinct
225225 // This test is only applicable when a Metric has labels
226- if test . labelVals != nil && len (test .labelVals ) >= 1 {
226+ if len (test .labelVals ) >= 1 {
227227 altLabels := make ([]string , len (test .labelVals ))
228228 copy (altLabels , test .labelVals )
229229 altLabels [0 ] = "alt-val1"
0 commit comments