Merge pull request #4720 from teresy/redundant-nil-check-slice

Remove redundant nil check
pull/4712/merge
Simon Pasquier 6 years ago committed by GitHub
commit 3e6b9d43c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -244,11 +244,9 @@ func (d *Discovery) refresh() (tg *targetgroup.Group, err error) {
}
// GCE labels are key-value pairs that group associated resources
if inst.Labels != nil {
for key, value := range inst.Labels {
name := strutil.SanitizeLabelName(key)
labels[gceLabelLabel+model.LabelName(name)] = model.LabelValue(value)
}
for key, value := range inst.Labels {
name := strutil.SanitizeLabelName(key)
labels[gceLabelLabel+model.LabelName(name)] = model.LabelValue(value)
}
if len(priIface.AccessConfigs) > 0 {

Loading…
Cancel
Save