forked from forgejo/forgejo
Fix issue pages URL params
This commit is contained in:
parent
34f4af9ebf
commit
eb6021f73f
7 changed files with 49 additions and 30 deletions
|
@ -412,6 +412,11 @@ func (f StrTo) Int() (int, error) {
|
|||
return int(v), err
|
||||
}
|
||||
|
||||
func (f StrTo) Int64() (int64, error) {
|
||||
v, err := strconv.ParseInt(f.String(), 10, 64)
|
||||
return int64(v), err
|
||||
}
|
||||
|
||||
func (f StrTo) String() string {
|
||||
if f.Exist() {
|
||||
return string(f)
|
||||
|
@ -541,16 +546,10 @@ func ActionDesc(act Actioner, avatarLink string) string {
|
|||
}
|
||||
|
||||
func DiffTypeToStr(diffType int) string {
|
||||
switch diffType {
|
||||
case 1:
|
||||
return "add"
|
||||
case 2:
|
||||
return "modify"
|
||||
case 3:
|
||||
return "del"
|
||||
default:
|
||||
return "unknown"
|
||||
diffTypes := map[int]string{
|
||||
1: "add", 2: "modify", 3: "del",
|
||||
}
|
||||
return diffTypes[diffType]
|
||||
}
|
||||
|
||||
func DiffLineTypeToStr(diffType int) string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue