Skip to content

Commit

Permalink
Consistently use pointer receivers
Browse files Browse the repository at this point in the history
  • Loading branch information
magaupp committed Dec 17, 2024
1 parent 2560b04 commit 0938faa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/resources/templates/go/solution/bubblesort.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ func NewBubbleSort() *BubbleSort {
return new(BubbleSort)
}

func (b BubbleSort) PerformSort(input []time.Time) {
func (b *BubbleSort) PerformSort(input []time.Time) {
for i := len(input) - 1; i >= 0; i-- {
for j := 0; j < i; j++ {
if input[j].After(input[j+1]) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/go/solution/mergesort.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ func NewMergeSort() *MergeSort {
}

// PerformSort is a wrapper method for the real MergeSort algorithm.
func (m MergeSort) PerformSort(input []time.Time) {
func (m *MergeSort) PerformSort(input []time.Time) {
mergeSort(input)
}

Expand Down

0 comments on commit 0938faa

Please sign in to comment.