commit against tests run is fixed

renamed tmpLinguist to repoLinguist and SimpleLinguistTestSuite to EnryTestSuit in common_test.go

changed receiver's name for TestSuites to 's'

fixed comments
This commit is contained in:
Manuel Carmona
2017-06-21 15:18:27 +02:00
parent ad46ae50f8
commit b7d4be5fdd
18 changed files with 163 additions and 75 deletions

View File

@ -0,0 +1,17 @@
package generator
import (
"bytes"
"text/template"
)
// 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{}
t := template.Must(template.New(tmplName).ParseFiles(tmplPath))
if err := t.Execute(buf, commit); err != nil {
return err
}
return formatedWrite(outPath, buf.Bytes())
}