@@ -65,7 +65,7 @@ func resourceShippingZoneCreate(ctx context.Context, d *schema.ResourceData, m i
6565 log .Print ("[DEBUG] Creating shippingzones in commercetools" )
6666 client := getClient (m )
6767
68- input := d .Get ("location" ).([] interface {} )
68+ input := d .Get ("location" ).(* schema. Set )
6969 locations := expandShippingZoneLocations (input )
7070
7171 draft := platform.ZoneDraft {
@@ -160,8 +160,8 @@ func resourceShippingZoneUpdate(ctx context.Context, d *schema.ResourceData, m i
160160 if d .HasChange ("location" ) {
161161 old , new := d .GetChange ("location" )
162162
163- oldLocations := expandShippingZoneLocations (old )
164- newLocations := expandShippingZoneLocations (new )
163+ oldLocations := expandShippingZoneLocations (old .( * schema. Set ) )
164+ newLocations := expandShippingZoneLocations (new .( * schema. Set ) )
165165
166166 for i , location := range oldLocations {
167167 if ! _locationInSlice (location , newLocations ) {
@@ -202,9 +202,8 @@ func resourceShippingZoneDelete(ctx context.Context, d *schema.ResourceData, m i
202202 return diag .FromErr (err )
203203}
204204
205- func expandShippingZoneLocations (input interface {}) []platform.Location {
206- inputSet := input .(* schema.Set )
207- inputSlice := inputSet .List ()
205+ func expandShippingZoneLocations (input * schema.Set ) []platform.Location {
206+ inputSlice := input .List ()
208207 result := make ([]platform.Location , len (inputSlice ))
209208
210209 for i := range inputSlice {
0 commit comments