package
1.5.0
Repository: https://github.com/aspiesoft/turbx.git
Documentation: pkg.go.dev

# Functions

Close handles stoping the compiler and clearing the cache.
Compile handles the final output and returns valid html/xhtml that can be passed to the user this method will automatically call preCompile if needed, and can read the cache file while its being written for an extra performance boost @compressOutput: 0 = none, 1 = gzip, 2 = brotli.
GetOpt is used to handle grabing an option from the user options that were passed this method accepts the arg as a simple text like []byte("myOption") this method can also handle complex options like {{this|'that'}} (with optional or statements) and even {{class="myClass"}} vars.
HasPreCompile returns true if a file has been pre compiled in the cache and is not expired.
NewFunc can be used to create custom functions for the compiler these user defined functions will only run after the default functions have been resolved.
preCompile generates a new pre-compiled file for the cache this compiles markdown and handles other complex methods this function is useful if you need to update any constand vars, defined with a "$" as the first char in their key name.
SetConfig can be used to set change the config options provided in the Config struct this method will also clear the cache.

# Structs

Config is used in the SetConfig method to simplify the args and make them optional.
KeyVal is used to allow key:value lists to be sorted in an array.