-
Notifications
You must be signed in to change notification settings - Fork 151
/
generate.go
22 lines (19 loc) · 1.09 KB
/
generate.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package fft
import (
"path/filepath"
"github.com/consensys/bavard"
"github.com/consensys/gnark-crypto/internal/generator/config"
)
func Generate(conf config.Curve, baseDir string, bgen *bavard.BatchGenerator) error {
conf.Package = "fft"
entries := []bavard.Entry{
{File: filepath.Join(baseDir, "doc.go"), Templates: []string{"doc.go.tmpl"}},
{File: filepath.Join(baseDir, "domain_test.go"), Templates: []string{"tests/domain.go.tmpl", "imports.go.tmpl"}},
{File: filepath.Join(baseDir, "domain.go"), Templates: []string{"domain.go.tmpl", "imports.go.tmpl"}},
{File: filepath.Join(baseDir, "fft_test.go"), Templates: []string{"tests/fft.go.tmpl", "imports.go.tmpl"}},
{File: filepath.Join(baseDir, "fft.go"), Templates: []string{"fft.go.tmpl", "imports.go.tmpl"}},
{File: filepath.Join(baseDir, "fuzz.go"), Templates: []string{"fuzz.go.tmpl", "imports.go.tmpl"}, BuildTag: "gofuzz"},
{File: filepath.Join(baseDir, "fuzz_test.go"), Templates: []string{"tests/fuzz.go.tmpl", "imports.go.tmpl"}, BuildTag: "gofuzz"},
}
return bgen.Generate(conf, conf.Package, "./fft/template/", entries...)
}