1set / gut

🍱 yet another collection of go utilities & tools
MIT License
27 stars 9 forks source link

Add WeightedChoice() && WeightedShuffle() #78

Closed an63 closed 4 years ago

codecov[bot] commented 4 years ago

Codecov Report

Merging #78 into master will decrease coverage by 0.67%. The diff coverage is 86.95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #78      +/-   ##
==========================================
- Coverage   95.22%   94.54%   -0.68%     
==========================================
  Files          22       23       +1     
  Lines         816      880      +64     
==========================================
+ Hits          777      832      +55     
- Misses         29       35       +6     
- Partials       10       13       +3
Impacted Files Coverage Δ
yrand/randelem.go 93.1% <100%> (+0.51%) :arrow_up:
yrand/common.go 94.73% <100%> (+1.4%) :arrow_up:
yrand/weight.go 83.33% <83.33%> (ø)
codeclimate[bot] commented 4 years ago

Code Climate has analyzed commit 880eef7b and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 88.2% (50% is the threshold).

This pull request will bring the total coverage in the repository to 95.8% (-0.7% change).

View more on Code Climate.

an63 commented 4 years ago

Codacy Here is an overview of what got changed by this pull request:


Issues
======
- Added 1

Complexity increasing per file
==============================
- yrand/weight.go  14
- yrand/weight_test.go  15

Clones added
============
- yrand/weight_test.go  8

Clones removed
==============
+ yrand/randstr_test.go  -2

See the complete overview on Codacy