code: func (t *TemplateResource) check() error {
  	var cmdBuffer bytes.Buffer
  	data := make(map[string]string)
  	data["src"] = t.StageFile.Name()
  	tmpl, err := template.New("checkcmd").Parse(t.CheckCmd)
  	if err != nil {
  		return err
  	}
  	if err := tmpl.Execute(&cmdBuffer, data); err != nil {
  		return err
  	}
  	return runCommand(cmdBuffer.String())
  }
docs: // check executes the check command to validate the staged config file. The
  // command is modified so that any references to src template are substituted
  // with a string representing the full path of the staged file. This allows the
  // check to be run on the staged file before overwriting the destination config
  // file.
  // It returns nil if the check command returns 0 and there are no other errors.