Add API card type

This commit is contained in:
2021-03-26 17:42:02 -07:00
parent c6af685621
commit 4a7e6b16af
3 changed files with 53 additions and 2 deletions
+6
View File
@@ -28,11 +28,17 @@ func wrapProxy(url string) string {
return fmt.Sprint("/proxy/", b64url)
}
// Wrap string in template.JS to unescape JS code
func unescapeJS(s string) template.JS {
return template.JS(s)
}
// Function to get template function map
func getFuncMap() template.FuncMap {
// Return function map with template functions
return template.FuncMap{
"dyn_template": dynamicTemplate,
"proxy": wrapProxy,
"unescJS": unescapeJS,
}
}