You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
437 B
25 lines
437 B
3 years ago
|
package templates
|
||
|
|
||
|
import "html/template"
|
||
|
|
||
3 years ago
|
// UseFuncs returns a func map with template helpers functions
|
||
3 years ago
|
func UseFuncs() template.FuncMap {
|
||
|
return template.FuncMap{
|
||
3 years ago
|
"add": func(i int) int {
|
||
|
return i + 1
|
||
|
},
|
||
|
"sub": func(i int) int {
|
||
|
return i - 1
|
||
|
},
|
||
3 years ago
|
"getJSAppURL": func() string {
|
||
|
return URLJSApp
|
||
|
},
|
||
3 years ago
|
"getIndexURL": func() string {
|
||
|
return URLIndex
|
||
|
},
|
||
3 years ago
|
"getBlogURL": func() string {
|
||
|
return URLBlog
|
||
|
},
|
||
3 years ago
|
}
|
||
|
}
|