Skip to content

Commit

Permalink
return empty blockAddress when hclblock is nil, useful for composing …
Browse files Browse the repository at this point in the history
…unit test
  • Loading branch information
lonegunmanb committed Apr 18, 2024
1 parent 5b073fc commit 89bbac6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions block.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ func concatLabels(labels []string) string {
}

func blockAddress(b *HclBlock) string {
if b == nil {
return ""
}
sb := strings.Builder{}
sb.WriteString(b.Block.Type)
sb.WriteString(".")
Expand Down

0 comments on commit 89bbac6

Please sign in to comment.