3 ms·
Yes. Your DSL is JSON in this case, { "enums": [ { "package": "cmd", "type": "operation", "values": [ "Escalated", "Ar
by llmblockchain 3y ago
Yes. Your DSL is JSON in this case,
{
"enums": [
{
"package": "cmd",
"type": "operation",
"values": [
"Escalated",
"Archived",
"Deleted",
"Completed"
]
}
]
}
My point was the "Go" way to do this isn't parsing a custom format (like your JSON), but it's to use go generate.
- zarldev 3y agoBut all go generate does is run a binary like stringer? This can be used in go generate.
- mariusor 3y agoI'm not sure I understand exactly what you mean, but you can combine go:generate with go run so you can execute code from the current module/project that does what you want. //go:generate go run ./internal/enumhelper -flag1 -flag2