Documentation ¶
Index ¶
- func ActionContent2Commits(act Actioner) *models.PushCommits
- func ActionIcon(opType int) string
- func DiffLineTypeToStr(diffType int) string
- func DiffTypeToStr(diffType int) string
- func EscapePound(str string) string
- func List(l *list.List) chan interface{}
- func NewFuncMap() []template.FuncMap
- func NewLine2br(raw string) string
- func RenderCommitMessage(full bool, msg, urlPrefix string, metas map[string]string) string
- func ReplaceLeft(s, old, new string) string
- func Safe(raw string) template.HTML
- func Sha1(str string) string
- func Str2HTML(raw string) template.HTML
- func ToUTF8(content string) string
- func ToUTF8WithErr(content []byte) (error, string)
- type Actioner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionContent2Commits ¶
func ActionContent2Commits(act Actioner) *models.PushCommits
func ActionIcon ¶
ActionIcon accepts a int that represents action operation type and returns a icon class name.
func DiffLineTypeToStr ¶
func DiffTypeToStr ¶
func EscapePound ¶
func NewFuncMap ¶
TODO: only initialize map once and save to a local variable to reduce copies.
func NewLine2br ¶ added in v0.11.53
NewLine2br simply replaces "\n" to "<br>".
func RenderCommitMessage ¶
RenderCommitMessage renders commit message with special links.
func ReplaceLeft ¶
Replaces all prefixes 'old' in 's' with 'new'. FIXME: Unused function
func ToUTF8WithErr ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.