Version: v0.10.18 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2017 License: MIT Imports: 18 Imported by: 0




This section is empty.


This section is empty.


func ActionContent2Commits

func ActionContent2Commits(act Actioner) *models.PushCommits

func ActionIcon

func ActionIcon(opType int) string

ActionIcon accepts a int that represents action operation type and returns a icon class name.

func DiffLineTypeToStr

func DiffLineTypeToStr(diffType int) string

func DiffTypeToStr

func DiffTypeToStr(diffType int) string

func EscapePound added in v0.9.113

func EscapePound(str string) string

func List

func List(l *list.List) chan interface{}

func NewFuncMap added in v0.9.0

func NewFuncMap() []template.FuncMap

func RenderCommitMessage

func RenderCommitMessage(full bool, msg, urlPrefix string, metas map[string]string) template.HTML

RenderCommitMessage renders commit message with XSS-safe and special links.

func ReplaceLeft

func ReplaceLeft(s, old, new string) string

Replaces all prefixes 'old' in 's' with 'new'.

func Safe

func Safe(raw string) template.HTML

func Sha1

func Sha1(str string) string

func Str2html

func Str2html(raw string) template.HTML

func ToUTF8 added in v0.9.71

func ToUTF8(content string) string

func ToUTF8WithErr added in v0.9.71

func ToUTF8WithErr(content []byte) (error, string)


type Actioner

type Actioner interface {
	GetOpType() int
	GetActUserName() string
	GetRepoUserName() string
	GetRepoName() string
	GetRepoPath() string
	GetRepoLink() string
	GetBranch() string
	GetContent() string
	GetCreate() time.Time
	GetIssueInfos() []string

Source Files


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL