package
2.0.3+incompatible
Repository: https://github.com/zew/go-questionnaire.git
Documentation: pkg.go.dev

# Functions

Exec template with map of contents into writer w; cnt as io.Writer would be more efficient? Automatically created keys Req Sess L LangCode Site CSSSite HTMLTitle LogoTitle Keys expected to be supplied by caller Content */.
ExecContent is a simplified version of Exec() with only one content element.
Get returns a parsed bundle of templates by name either pre-parsed from cache, or freshly parsed; called for every template at app *init* time; thus no sync mutex is required; TemplatesPreparse() calls this func with param forceFreshParsing true Exec() calls this func with param forceFreshParsing false.
NewDocServer maps docPrefix to ./app-bucket/content; for instance /doc/ /urlprefix/doc/ serves files from ./app-bucket/content Markdown files are converted to HTML; needs session to differentiate files by language setting the actual handler is ServeDoc() below.
RenderStack renders a chain of templates.
RenderStaticContent writes the content of subPth into w; *.md files are rendered to HTML; *.html files only get URLs rewriting; static files reside in ./app-bucket/content; files may be differentiated by /[site]/[lang]/subPth subPth is a partial path plus filename.
ServeDoc serves markdown and other content in app-prefix/doc/.
ServeDynCSS can serve CSS files for different sites; the url path specifies the key to a CSSVarsSite entry; i.e.
SiteCore returns only the non-numerical part of the site name; for instance 'pat' from 'pat0'; used for sharing the same CSS files and CSS settings among multiple questionnaires.
StaticDownloadH serves static files.
Struct2Map converts any struct instance into map[string]interface{}; previously we used extensions of struct type BaseTemplateData to guarantee certain keys in templates; recently we add these minimum keys in Exec(); this func now allows usage of tpl.RenderStack() or tpl.Exec() with a struct instead of a map[string]interface{}.
TemplatesPreparse - parsing templates is expensive; concurrent access is expensive; we parse all templates in this http handler which is also used for initialization at app start in bootstrap.