mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-28 11:00:59 -03:00
Squashed 'go-enry/' content from commit 7e3a9a7
git-subtree-dir: go-enry
git-subtree-split: 7e3a9a7241
This commit is contained in:
14
internal/code-generator/generator/linguist-commit.go
Normal file
14
internal/code-generator/generator/linguist-commit.go
Normal file
@ -0,0 +1,14 @@
|
||||
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())
|
||||
}
|
Reference in New Issue
Block a user