Documentation
¶
Overview ¶
Package utils provides shared helpers for the Outtake web layer.
Index ¶
Constants ¶
View Source
const ControlClass = "" /* 300-byte string literal not displayed */
ControlClass is the shared class list for text inputs and native selects.
Variables ¶
View Source
var ScriptURL = assets.URL
ScriptURL names a script by a URL that carries a hash of its contents, so the browser fetches it again only when it changes.
View Source
var UseUnminifiedScripts = false
UseUnminifiedScripts switches component script loading to the unminified files.
Functions ¶
func ComponentScript ¶
ComponentScript renders a deferred script tag for a component JavaScript file.
Parameters:
- component: Component name whose script is loaded.
Returns:
- script: A component rendering the script tag.
func If ¶
If returns value when condition is true and the zero value of T otherwise.
Parameters:
- condition: Whether to return value.
- value: The value to return when condition is true.
Returns:
- result: value when condition is true, otherwise the zero value of T.
func IfElse ¶
IfElse returns one of two values based on condition.
Parameters:
- condition: Whether to return trueValue.
- trueValue: The value to return when condition is true.
- falseValue: The value to return when condition is false.
Returns:
- result: trueValue when condition is true, otherwise falseValue.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.