code-gen: syntax-aware generation of vendor regex

This commit is contained in:
Alex Bezzubov
2022-12-25 11:58:23 +01:00
parent 3aeb9879da
commit 319e630aaf
4 changed files with 18 additions and 3 deletions

View File

@ -45,6 +45,7 @@ func executeTemplate(w io.Writer, name, path, commit string, fmap template.FuncM
}
fmap["getCommit"] = getCommit
fmap["stringVal"] = stringVal
fmap["isRE2"] = isRE2
const headerTmpl = "header.go.tmpl"
headerPath := filepath.Join(filepath.Dir(path), headerTmpl)