Rename WeightedChooser's method Put to Add, a better name

This commit is contained in:
Deluan
2023-01-13 19:43:27 -05:00
parent 291455f0b7
commit 769e8bedba
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ func NewWeightedRandomChooser() *WeightedChooser {
return &WeightedChooser{}
}
func (w *WeightedChooser) Put(value interface{}, weight int) {
func (w *WeightedChooser) Add(value interface{}, weight int) {
w.entries = append(w.entries, value)
w.weights = append(w.weights, weight)
w.totalWeight += weight