修改 #52
|
@ -54,18 +54,18 @@ func (bk BranchKind) Title() string {
|
||||||
type BranchesSlice struct {
|
type BranchesSlice struct {
|
||||||
BranchName string `json:"branch_name"`
|
BranchName string `json:"branch_name"`
|
||||||
// BranchKind int `json:"branch_kind"`
|
// BranchKind int `json:"branch_kind"`
|
||||||
Branches []Branch `json:"branches"`
|
Branches []*Branch `json:"branches"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// sort by branchkind
|
// sort by branchkind
|
||||||
type SortBranch []Branch
|
type SortBranch []*Branch
|
||||||
|
|
||||||
func (s SortBranch) Len() int { return len(s) }
|
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) 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 }
|
func (s SortBranch) Less(i, j int) bool { return s[i].BranchKind < s[j].BranchKind }
|
||||||
|
|
||||||
// sort by CommiTime of the branch
|
// sort by CommiTime of the branch
|
||||||
type SortBranchTime []Branch
|
type SortBranchTime []*Branch
|
||||||
|
|
||||||
func (s SortBranchTime) Len() int { return len(s) }
|
func (s SortBranchTime) Len() int { return len(s) }
|
||||||
func (s SortBranchTime) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
|
func (s SortBranchTime) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
|
||||||
|
|
Loading…
Reference in New Issue