From 526d04053434565eb6ce22e9833e3ab2a3a845a9 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Thu, 30 Apr 2020 11:51:24 +0200 Subject: [PATCH] document Parser.Parse better --- hcl2template/parser.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hcl2template/parser.go b/hcl2template/parser.go index 169d336f3..59efd69c0 100644 --- a/hcl2template/parser.go +++ b/hcl2template/parser.go @@ -52,10 +52,14 @@ const ( hcl2VarJsonFileExt = ".auto.pkrvars.json" ) -// Parse will Parse HCL file(s) in path. Path can be a folder or a file. +// Parse will Parse all HCL files in filename. Path can be a folder or a file. // // Parse will first Parse variables and then the rest; so that interpolation // can happen. +// +// Parse returns a PackerConfig that contains configuration layout of a packer +// build; sources(builders)/provisioners/posts-processors will not be started +// and their contents wont be verified; Most syntax errors will cause an error. func (p *Parser) Parse(filename string, varFiles []string, argVars map[string]string) (*PackerConfig, hcl.Diagnostics) { var files []*hcl.File