mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-08-25 04:45:46 +00:00
linter
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
parent
67a5481047
commit
e86fce1c13
@ -131,6 +131,7 @@ func (d *genericZoneDataSource) Read(ctx context.Context, req datasource.ReadReq
|
|||||||
"SDN Zone Not Found",
|
"SDN Zone Not Found",
|
||||||
fmt.Sprintf("SDN zone with ID '%s' was not found", state.getID()),
|
fmt.Sprintf("SDN zone with ID '%s' was not found", state.getID()),
|
||||||
)
|
)
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,6 +154,7 @@ func (d *genericZoneDataSource) Read(ctx context.Context, req datasource.ReadReq
|
|||||||
zone.ID,
|
zone.ID,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,13 +154,16 @@ func (d *zonesDataSource) Read(ctx context.Context, req datasource.ReadRequest,
|
|||||||
"Unable to Read SDN Zones",
|
"Unable to Read SDN Zones",
|
||||||
err.Error(),
|
err.Error(),
|
||||||
)
|
)
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
filteredZones := zonesList
|
filteredZones := zonesList
|
||||||
|
|
||||||
if !data.Type.IsNull() && !data.Type.IsUnknown() {
|
if !data.Type.IsNull() && !data.Type.IsUnknown() {
|
||||||
filterType := data.Type.ValueString()
|
filterType := data.Type.ValueString()
|
||||||
filteredZones = make([]zones.ZoneData, 0)
|
filteredZones = make([]zones.ZoneData, 0)
|
||||||
|
|
||||||
for _, zone := range zonesList {
|
for _, zone := range zonesList {
|
||||||
if zone.Type != nil && *zone.Type == filterType {
|
if zone.Type != nil && *zone.Type == filterType {
|
||||||
filteredZones = append(filteredZones, zone)
|
filteredZones = append(filteredZones, zone)
|
||||||
|
Loading…
Reference in New Issue
Block a user