code: func RemoveReference(field *[]types.ManagedObjectReference, ref types.ManagedObjectReference) {
  	for i, r := range *field {
  		if r == ref {
  			*field = append((*field)[:i], (*field)[i+1:]...)
  			break
  		}
  	}
  }
docs: // RemoveReference removes ref from the given field.