Skip to content

Commit 9800437

Browse files
committed
refactor(source/f5_virtualserver): remove if check for array length, already taken care of by the iterator
1 parent ad0e30e commit 9800437

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

source/f5_virtualserver.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,9 @@ func (vs *f5VirtualServerSource) endpointsFromVirtualServers(virtualServers []*f
170170

171171
endpoints = append(endpoints, EndpointsForHostname(virtualServer.Spec.Host, targets, ttl, nil, "", resource)...)
172172

173-
// Process hostAliases if they exist
174-
if len(virtualServer.Spec.HostAliases) > 0 {
175-
for _, alias := range virtualServer.Spec.HostAliases {
176-
if alias != "" {
177-
endpoints = append(endpoints, EndpointsForHostname(alias, targets, ttl, nil, "", resource)...)
178-
}
173+
for _, alias := range virtualServer.Spec.HostAliases {
174+
if alias != "" {
175+
endpoints = append(endpoints, EndpointsForHostname(alias, targets, ttl, nil, "", resource)...)
179176
}
180177
}
181178
}

0 commit comments

Comments
 (0)