修改 #52

Merged
wonderful merged 1 commits from wonderful/gitea-1156:develop into develop 2022-04-25 14:12:19 +08:00
1 changed files with 3 additions and 3 deletions

View File

@ -54,18 +54,18 @@ func (bk BranchKind) Title() string {
type BranchesSlice struct {
BranchName string `json:"branch_name"`
// BranchKind int `json:"branch_kind"`
Branches []Branch `json:"branches"`
Branches []*Branch `json:"branches"`
}
// sort by branchkind
type SortBranch []Branch
type SortBranch []*Branch
func (s SortBranch) Len() int { return len(s) }
func (s SortBranch) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
func (s SortBranch) Less(i, j int) bool { return s[i].BranchKind < s[j].BranchKind }
// sort by CommiTime of the branch
type SortBranchTime []Branch
type SortBranchTime []*Branch
func (s SortBranchTime) Len() int { return len(s) }
func (s SortBranchTime) Swap(i, j int) { s[i], s[j] = s[j], s[i] }