code: func (r *Render) Validate() {
  	// add trailing slash if the user has forgotten..
  	if !strings.HasSuffix(r.TemplatesDir, "/") {
  		r.TemplatesDir = r.TemplatesDir + "/"
  	}
  
  	// check for templates dir
  	if ok, _ := exists(r.TemplatesDir); !ok {
  		panic(r.TemplatesDir + " directory for rendering templates does not exist.\n Configure this by setting htmlRender.TemplatesDir = \"your-tpl-dir/\"")
  	}
  
  	// check for layout file
  	layoutFile := r.TemplatesDir + r.Layout + r.Ext
  	if ok, _ := exists(layoutFile); !ok {
  		panic(layoutFile + " layout file does not exist")
  	}
  }
docs: // Validate checks if the directory and the layout files exist as expected
  // and configured