Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix miss makezero bug #18251

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion google/services/compute/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func BetaMetadataUpdate(oldMDMap map[string]interface{}, newMDMap map[string]int
}

func expandComputeMetadata(m map[string]interface{}) []*compute.MetadataItems {
metadata := make([]*compute.MetadataItems, len(m))
metadata := make([]*compute.MetadataItems, 0, len(m))
var keys []string
for key := range m {
keys = append(keys, key)
Expand Down
4 changes: 2 additions & 2 deletions google/services/compute/resource_compute_subnetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ func resourceComputeSubnetworkSecondaryIpRangeSetStyleDiff(_ context.Context, di
if count < 1 {
return nil
}
old := make([]interface{}, count)
new := make([]interface{}, count)
old := make([]interface{}, 0, count)
new := make([]interface{}, 0, count)
for i := 0; i < count; i++ {
o, n := diff.GetChange(fmt.Sprintf("secondary_ip_range.%d", i))

Expand Down