Skip to content

Commit 4a79182

Browse files
chore(format): auto-format code [skip ci]
1 parent 21b0254 commit 4a79182

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

internal/exercises/solutions/37_sorting_by_functions/sorting_by_functions.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ func SortByName(people []Person) []Person {
4545
// Create a copy of the slice to avoid modifying the original
4646
result := make([]Person, len(people))
4747
copy(result, people)
48-
48+
4949
// Sort the copy by name
5050
sort.Sort(ByName(result))
51-
51+
5252
return result
5353
}
5454

@@ -57,9 +57,9 @@ func SortByAge(people []Person) []Person {
5757
// Create a copy of the slice to avoid modifying the original
5858
result := make([]Person, len(people))
5959
copy(result, people)
60-
60+
6161
// Sort the copy by age
6262
sort.Sort(ByAge(result))
63-
63+
6464
return result
6565
}

internal/exercises/templates/37_sorting_by_functions/sorting_by_functions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ func SortByAge(people []Person) []Person {
6060
// TODO: create a copy of the slice and sort it by age
6161
// Hint: use sort.Sort() with ByAge type
6262
return nil
63-
}
63+
}

internal/exercises/templates/37_sorting_by_functions/sorting_by_functions_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@ func TestByAgeInterface(t *testing.T) {
123123
if byAge[0].Age != original[1].Age || byAge[1].Age != original[0].Age {
124124
t.Errorf("ByAge.Swap(0, 1) did not swap correctly")
125125
}
126-
}
126+
}

0 commit comments

Comments
 (0)