faker icon indicating copy to clipboard operation
faker copied to clipboard

Allow ability to use `json` tag to get lower case names

Open kyprifog opened this issue 6 years ago • 2 comments

Structs in Go have to have upper case names in order to be public but in json you can get around this by passing the tag: `json: name_lower`

Is there a way to do something similar with faker so that field names don't have to always be upper case?

kyprifog avatar Dec 12 '19 17:12 kyprifog

Hmm.. interesting.

I haven't tested it yet. Have you tested it?

I wonder if that's possible, but it will need time to research this. I might need someone's help if possible. If not, I will take a look at this when I'm free.

bxcodec avatar Dec 13 '19 03:12 bxcodec

FTR I tried that but it didn't work, id have to spend a bit more time knowing how the library works to know if it made sense for it to work. I want to just be able to produce fake data with a lower case character. May be other ways to achieve the same result.

kyprifog avatar Dec 16 '19 14:12 kyprifog