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

feat: Adds Slice length tag #109

Merged
merged 3 commits into from
Jun 15, 2020
Merged

feat: Adds Slice length tag #109

merged 3 commits into from
Jun 15, 2020

Conversation

Icety
Copy link
Contributor

@Icety Icety commented Jun 12, 2020

Adds the possibility to set a specific slice length for all types of slices.
Tag: slice_len=$d with $d a number >= 0

Fixes #92

@codecov
Copy link

codecov bot commented Jun 12, 2020

Codecov Report

Merging #109 into master will decrease coverage by 0.26%.
The diff coverage is 78.94%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #109      +/-   ##
==========================================
- Coverage   95.71%   95.44%   -0.27%     
==========================================
  Files          11       11              
  Lines        1236     1251      +15     
==========================================
+ Hits         1183     1194      +11     
- Misses         30       32       +2     
- Partials       23       25       +2     
Impacted Files Coverage Δ
faker.go 91.40% <78.94%> (-0.49%) ⬇️

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 2a46c04...4175dce. Read the comment docs.

@@ -108,6 +108,7 @@ const (
AmountWithCurrencyTag = "amount_with_currency"
SKIP = "-"
Length = "len"
SliceLength = "slice_len"
Copy link
Owner

Choose a reason for hiding this comment

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

is it possible to use len instead? to make the same experience?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shouldn't it be possible to use both?
Have a slice of []string where you can set both the length of the slice and of each string in the slice?

Copy link
Owner

Choose a reason for hiding this comment

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

Ahh, I see. That makes sense

@bxcodec bxcodec changed the title Adds Slice length tag feat: Adds Slice length tag Jun 15, 2020
@bxcodec bxcodec merged commit 3f13091 into bxcodec:master Jun 15, 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.

Arrays or Slices of Public structs not supported when tag is faker:"len=?"
2 participants