-
-
Notifications
You must be signed in to change notification settings - Fork 295
Open
Description
Hi, I'm testing this library out for use, I tried generating some time test data using the example in the read me but run into parse errors
This is my example struct
type Record struct {
ID int64
RecordID string `csv:"API_ID" fake:"{number:100000,999999}"`
Source string `csv:"source" fake:"{firstname}"`
PurchaseDate time.Time `fake:"{year}-{month}-{day}" format:"2006-01-02"`
RecordType string
CreatedAt time.Time `fake:"{year}-{month}-{day}" format:"2006-01-02"`
}
this is how I call it
var foo Record
err := gofakeit.Struct(&foo)
and this is what im seeing in my logs
2025/03/27 16:44:13 error generating foo data 0
parsing time "1912-8-13" as "2006-01-02": cannot parse "8-13" as "01"
2025/03/27 16:44:13 error generating foo data 1
parsing time "1955-9-8" as "2006-01-02": cannot parse "9-8" as "01"
I'll try and dig into the code to see if I can figure out what's going on but just wanted to raise this as I didn't see it as a pending issue
Metadata
Metadata
Assignees
Labels
No labels