mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Almost done diff page
This commit is contained in:
@@ -70,5 +70,6 @@ var TemplateFuncs template.FuncMap = map[string]interface{}{
|
||||
"SubStr": func(str string, start, length int) string {
|
||||
return str[start : start+length]
|
||||
},
|
||||
"DiffTypeToStr": DiffTypeToStr,
|
||||
"DiffTypeToStr": DiffTypeToStr,
|
||||
"DiffLineTypeToStr": DiffLineTypeToStr,
|
||||
}
|
||||
|
@@ -552,3 +552,15 @@ func DiffTypeToStr(diffType int) string {
|
||||
return "unknown"
|
||||
}
|
||||
}
|
||||
|
||||
func DiffLineTypeToStr(diffType int) string {
|
||||
switch diffType {
|
||||
case 2:
|
||||
return "add"
|
||||
case 3:
|
||||
return "del"
|
||||
case 4:
|
||||
return "tag"
|
||||
}
|
||||
return "same"
|
||||
}
|
||||
|
Reference in New Issue
Block a user