From be6365c3d514efb297d5a2a6e5071b4efad1a29b Mon Sep 17 00:00:00 2001 From: hang Date: Mon, 25 Apr 2022 14:10:25 +0800 Subject: [PATCH] add --- modules/structs/repo_branch.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/structs/repo_branch.go b/modules/structs/repo_branch.go index f274a480b..5c29af63c 100644 --- a/modules/structs/repo_branch.go +++ b/modules/structs/repo_branch.go @@ -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] } -- 2.34.1