github.com/consensys/gnark-crypto@v0.14.0/internal/generator/hash_to_field/generate.go (about)

     1  package hash_to_field
     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.FieldDependency, baseDir string, bgen *bavard.BatchGenerator) error {
    11  	entries := []bavard.Entry{
    12  		{File: filepath.Join(baseDir, "doc.go"), Templates: []string{"doc.go.tmpl"}},
    13  		{File: filepath.Join(baseDir, "hash_to_field.go"), Templates: []string{"hash_to_field.go.tmpl"}},
    14  		{File: filepath.Join(baseDir, "hash_to_field_test.go"), Templates: []string{"hash_to_field_test.go.tmpl"}},
    15  	}
    16  
    17  	return bgen.Generate(conf, "hash_to_field", "./hash_to_field/template", entries...)
    18  }