wawandco/fako

Support for numeric types

paganotoni opened this issue · 3 comments

When faking data, sometimes we will need to generate numeric values like:

  • invoice amount
  • number of items
  • received calls
  • failed password attempts

Currently Fako doesn't support generating numeric values for us, my idea is to allow users to define a range for particular fields like:

type Invoice struct {
  Amount  float64  `fako:"max:200.0;min:0.0"`
  DaysToWait  int64     `fako:"max:200;min:0"`
}

This way when funning fako.FIll(&invoice) it should fill invoice.Amount with a value between 0.0 and 200.0 (float).

+1

and may be price

+1
I try:
Number int fako:"price"

but it panic