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

Support enumeration? #121

Open
BPing opened this issue Oct 9, 2020 · 2 comments
Open

Support enumeration? #121

BPing opened this issue Oct 9, 2020 · 2 comments

Comments

@BPing
Copy link

BPing commented Oct 9, 2020

No description provided.

@bxcodec
Copy link
Owner

bxcodec commented Oct 9, 2020

Hmmm,

do you have any use case scenario for this?

@eduardo-mior
Copy link

eduardo-mior commented Apr 26, 2021

Use oneof tag.
Example:

type TestStruct struct {
    MyEnum         int `faker:"oneof: 1, 2, 3, 4"`
    MyOtherEnum string `faker:"oneof: YELLOW, BLUE, GREEN, RED"`
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants