Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

fix: 0 not valid for random size #96

Merged
merged 2 commits into from
May 27, 2020

Conversation

mattquest
Copy link
Contributor

Current code accepts 0 as a valid number for SetRandomMapAndSliceSize then panics on the Intn call with panic: invalid argument to Intn

logically invalid to as for a random number between 0 and 0 but more importantly, it panics on the Intn call with `panic: invalid argument to Intn`
@codecov
Copy link

codecov bot commented May 2, 2020

Codecov Report

Merging #96 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #96   +/-   ##
=======================================
  Coverage   94.92%   94.92%           
=======================================
  Files          10       10           
  Lines         966      966           
=======================================
  Hits          917      917           
  Misses         27       27           
  Partials       22       22           
Impacted Files Coverage Δ
faker.go 90.37% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1637e9c...114a702. Read the comment docs.

Copy link
Owner

@bxcodec bxcodec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bxcodec bxcodec changed the title 0 not valid for random size fix: 0 not valid for random size May 27, 2020
@bxcodec bxcodec merged commit ab0e82b into bxcodec:master May 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants