mirror of
https://github.com/turbot/steampipe.git
synced 2025-12-19 18:12:43 -05:00
13 lines
228 B
Go
13 lines
228 B
Go
package parse
|
|
|
|
import "github.com/hashicorp/hcl/v2"
|
|
|
|
func getFirstBlockOfType(blocks hcl.Blocks, blockType string) *hcl.Block {
|
|
for _, block := range blocks {
|
|
if block.Type == blockType {
|
|
return block
|
|
}
|
|
}
|
|
return nil
|
|
}
|