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.

28 lines
593 B

  1. // Copyright 2014 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package base
  5. import (
  6. "html/template"
  7. )
  8. func Str2html(raw string) template.HTML {
  9. return template.HTML(raw)
  10. }
  11. var TemplateFuncs template.FuncMap = map[string]interface{}{
  12. "AppName": func() string {
  13. return AppName
  14. },
  15. "AppVer": func() string {
  16. return AppVer
  17. },
  18. "str2html": Str2html,
  19. "TimeSince": TimeSince,
  20. "Subtract": Subtract,
  21. "ActionIcon": ActionIcon,
  22. "ActionDesc": ActionDesc,
  23. "DateFormat": DateFormat,
  24. }