diff --git a/api/v1beta1/openstackipset_types.go b/api/v1beta1/openstackipset_types.go index c1473646..75cffba8 100644 --- a/api/v1beta1/openstackipset_types.go +++ b/api/v1beta1/openstackipset_types.go @@ -102,8 +102,8 @@ func init() { // GetHostnames - func (instance OpenStackIPSet) GetHostnames() map[string]string { ret := make(map[string]string) - for _, val := range instance.Status.Hosts { - ret[val.Hostname] = val.HostRef + for hostname, val := range instance.Status.Hosts { + ret[hostname] = val.HostRef } return ret }