github.com/consensys/gnark-crypto@v0.14.0/internal/generator/edwards/eddsa/generate.go (about) 1 package eddsa 2 3 import ( 4 "path/filepath" 5 6 "github.com/consensys/bavard" 7 "github.com/consensys/gnark-crypto/internal/generator/config" 8 ) 9 10 func Generate(conf config.TwistedEdwardsCurve, baseDir string, bgen *bavard.BatchGenerator) error { 11 // eddsa 12 conf.Package = "eddsa" 13 baseDir = filepath.Join(baseDir, conf.Package) 14 15 entries := []bavard.Entry{ 16 {File: filepath.Join(baseDir, "doc.go"), Templates: []string{"doc.go.tmpl"}}, 17 {File: filepath.Join(baseDir, "eddsa.go"), Templates: []string{"eddsa.go.tmpl"}}, 18 {File: filepath.Join(baseDir, "eddsa_test.go"), Templates: []string{"eddsa.test.go.tmpl"}}, 19 {File: filepath.Join(baseDir, "marshal.go"), Templates: []string{"marshal.go.tmpl"}}, 20 } 21 return bgen.Generate(conf, conf.Package, "./edwards/eddsa/template", entries...) 22 23 }