Skip to content

Commit

Permalink
function name change
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiefMateStarbuck committed Dec 22, 2021
1 parent 83f1f6e commit 53b2986
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions interface/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ func (c *Counter[T]) MinusCounter() T {
return c.t
}

func NewCounter[T Int64](t T, counter T) NumberPlayer[T] {
func NewNumberPlayer[T Int64](t T, counter T) NumberPlayer[T] {
return &Counter[T]{
t: t,
counter: counter,
}
}

func main() {
numbers := NewCounter(int64(32), int64(2))
numbers := NewNumberPlayer(int64(32), int64(2))
println(numbers.AddCounter())
println(numbers.MinusCounter())

numbersAgain := NewCounter(uint64(32), uint64(9))
numbersAgain := NewNumberPlayer(uint64(32), uint64(9))
println(numbersAgain.AddCounter())
println(numbersAgain.MinusCounter())
}

0 comments on commit 53b2986

Please sign in to comment.