DSL? The go way is to use go generate I would say and it can be used with go:generate, I would like to use the AST lib to parse go files to remove the need for any json and to be more like the cmd stringer tool.
I'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
{ "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.