Skip to content

Commit

Permalink
Let expander & flattener functions return empty array instead of nil
Browse files Browse the repository at this point in the history
  • Loading branch information
pdecat committed Dec 27, 2018
1 parent 3ad1559 commit ec8ad78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions azurerm/helpers/azure/app_insights.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func ExpandApplicationInsightsAPIKeyLinkedProperties(v *schema.Set, appInsightsId string) *[]string {
if v == nil {
return nil
return &[]string{}
}

result := make([]string, v.Len())
Expand All @@ -21,7 +21,7 @@ func ExpandApplicationInsightsAPIKeyLinkedProperties(v *schema.Set, appInsightsI

func FlattenApplicationInsightsAPIKeyLinkedProperties(props *[]string) *[]string {
if props == nil {
return nil
return &[]string{}
}

result := make([]string, len(*props))
Expand Down

0 comments on commit ec8ad78

Please sign in to comment.