mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-14 07:22:23 +00:00
7eafe024af
Signed-off-by: Denys Smirnov <denys@sourced.tech>
15 lines
404 B
Go
15 lines
404 B
Go
package generator
|
|
|
|
import (
|
|
"bytes"
|
|
)
|
|
|
|
// Commit takes a commit and builds the source file from tmplPath. It complies with type File signature.
|
|
func Commit(fileToParse, samplesDir, outPath, tmplPath, tmplName, commit string) error {
|
|
buf := &bytes.Buffer{}
|
|
if err := executeTemplate(buf, tmplName, tmplPath, commit, nil, nil); err != nil {
|
|
return err
|
|
}
|
|
return formatedWrite(outPath, buf.Bytes())
|
|
}
|