Closed ttc0419 closed 2 weeks ago
Sorry i dont follow what your talking about. Can you send me an example of what your talking about?
@brianvoe
name string `json:"name" fake:"{csv:?}"`
According to the source code, "fields" is the only required parameter (i.e. does not have a default value) for csv function:
Display: "CSV",
Category: "file",
Description: "Individual lines or data entries within a CSV (Comma-Separated Values) format",
Example: `id,first_name,last_name,password
1,Markus,Moen,Dc0VYXjkWABx
2,Osborne,Hilll,XPJ9OVNbs5lm`,
Output: "[]byte",
ContentType: "text/csv",
Params: []Param{
{Field: "delimiter", Display: "Delimiter", Type: "string", Default: ",", Description: "Separator in between row values"},
{Field: "rowcount", Display: "Row Count", Type: "int", Default: "100", Description: "Number of rows"},
{Field: "fields", Display: "Fields", Type: "[]Field", Description: "Fields containing key name and function"},
},
How to only pass it to the function? And is there a better way to generate delimited string like "xxx-yyyy-zzz" with each substring being a valid word?
I mean technically you could put all the params needed for a csv or sql but I wouldn't recommend it for struct tags.
The README.md only has an example of struct tags, any chance to have a list of all struct tags with parameters and the description of its syntax, like how to only specify fields field using csv?