From 23aeb6ac992095b72a735b84241cb4a96b1d261a Mon Sep 17 00:00:00 2001 From: dudaodong Date: Mon, 22 Aug 2022 10:57:04 +0800 Subject: [PATCH] refactor: change sort file name --- algorithm/{sorter.go => sort.go} | 0 algorithm/{sorter_test.go => sort_test.go} | 10 ---------- 2 files changed, 10 deletions(-) rename algorithm/{sorter.go => sort.go} (100%) rename algorithm/{sorter_test.go => sort_test.go} (95%) diff --git a/algorithm/sorter.go b/algorithm/sort.go similarity index 100% rename from algorithm/sorter.go rename to algorithm/sort.go diff --git a/algorithm/sorter_test.go b/algorithm/sort_test.go similarity index 95% rename from algorithm/sorter_test.go rename to algorithm/sort_test.go index 5f05b2b..281ed36 100644 --- a/algorithm/sorter_test.go +++ b/algorithm/sort_test.go @@ -30,14 +30,6 @@ func (pc *peopleAgeComparator) Compare(v1 any, v2 any) int { return 0 } -// var peoples = []people{ -// {Name: "a", Age: 20}, -// {Name: "b", Age: 10}, -// {Name: "c", Age: 17}, -// {Name: "d", Age: 8}, -// {Name: "e", Age: 28}, -// } - type intComparator struct{} func (c *intComparator) Compare(v1 any, v2 any) int { @@ -53,8 +45,6 @@ func (c *intComparator) Compare(v1 any, v2 any) int { return 0 } -// var intSlice = []int{2, 1, 5, 3, 6, 4} - func TestBubbleSortForStructSlice(t *testing.T) { asssert := internal.NewAssert(t, "TestBubbleSortForStructSlice")