INNER CODE UNIT · Go

assertNoError

Consensys/gnark-crypto · internal/generator/main.go:278

func assertNoError(err error) {
	if err != nil {
		stopOnce.Do(func() { close(stopSpinner) })
		fmt.Fprintf(os.Stderr, "\n%s\n", err.Error())
		os.Exit(-1)
	}
}

// cleanGeneratedFiles removes all previously generated files (those with the
// "Code generated by consensys/gnark-crypto DO NOT EDIT" header) from dir and
// its subdirectories. This prevents stale generated files from persisting when
// the generation logic changes.
func cleanGeneratedFiles(dir string) {
	const generatedHeader = "Code generated by consensys/gnark-crypto DO NOT EDIT"
	filepath.Walk(dir, func(path string, info os.FileInfo, err error) error {
		if err != nil || info.IsDir() {
			return nil
		}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…