From d1492ccfcebbe768318e2e014c5e08f0b00ce780 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 19 Sep 2023 10:34:39 -0400 Subject: [PATCH] packer: make Core.Validate public Since we'll move the initialization code to the schedulers once they're in the codebase, we make the validation function public. --- packer/core.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packer/core.go b/packer/core.go index 86f8d0068..ba3006b3c 100644 --- a/packer/core.go +++ b/packer/core.go @@ -152,7 +152,7 @@ func (c *Core) Initialize(_ InitializeOptions) hcl.Diagnostics { } func (core *Core) initialize() error { - if err := core.validate(); err != nil { + if err := core.Validate(); err != nil { return err } if err := core.init(); err != nil { @@ -692,7 +692,7 @@ func (c *Core) FixConfig(opts FixConfigOptions) hcl.Diagnostics { // // This will automatically call template.validate() in addition to doing // richer semantic checks around variables and so on. -func (c *Core) validate() error { +func (c *Core) Validate() error { // First validate the template in general, we can't do anything else // unless the template itself is valid. if err := c.Template.Validate(); err != nil {