main.go 608 B

12345678910111213141516171819202122232425262728
  1. package main
  2. import (
  3. "flag"
  4. "git.eugeniocarvalho.dev/eugeniucarvalho/gg/generator"
  5. )
  6. var (
  7. Input = flag.String("input", "def.json", "Arquivo de descrição do projeto no formato JSON.")
  8. Out = flag.String("out", "./generators", "Destino dos arquivos gerados.")
  9. )
  10. //a.replace(/[\n\r]/g,";").replace(/\s+/g,'').split(";").map(function(k,v){dic[k]=1}); console.log(Object.getOwnPropertyNames(dic).sort())
  11. func main() {
  12. var (
  13. err error
  14. description *generator.Generator
  15. )
  16. flag.Parse()
  17. if description, err = generator.New(*Input); err != nil {
  18. panic(err)
  19. }
  20. description.Gen(*Out)
  21. }