github.com/timsutton/packer@v1.3.2/builder/parallels/common/prlctl_version_config.go (about)

     1  package common
     2  
     3  import (
     4  	"github.com/hashicorp/packer/template/interpolate"
     5  )
     6  
     7  // PrlctlVersionConfig contains the configuration for `prlctl` version.
     8  type PrlctlVersionConfig struct {
     9  	PrlctlVersionFile string `mapstructure:"prlctl_version_file"`
    10  }
    11  
    12  // Prepare sets the default value of "PrlctlVersionFile" property.
    13  func (c *PrlctlVersionConfig) Prepare(ctx *interpolate.Context) []error {
    14  	if c.PrlctlVersionFile == "" {
    15  		c.PrlctlVersionFile = ".prlctl_version"
    16  	}
    17  
    18  	return nil
    19  }