github.com/mineiros-io/terradoc@v0.0.9-0.20220711062319-018bd4ae81f5/internal/parsers/hclparser/hclparser.go (about)

     1  package hclparser
     2  
     3  import "github.com/hashicorp/hcl/v2"
     4  
     5  func GetAttribute(attrs hcl.Attributes, name string) *HCLAttribute {
     6  	attr, exists := attrs[name]
     7  	if exists {
     8  		return &HCLAttribute{attr}
     9  	}
    10  
    11  	return nil
    12  }