mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 06:33:06 -03:00
Added frequencies.go generation
This commit is contained in:
@ -54,7 +54,13 @@ const (
|
||||
aliasesTmplPath = "internal/code-generator/assets/aliases.go.tmpl"
|
||||
aliasesTmpl = "aliases.go.tmpl"
|
||||
|
||||
commitPath = ".git/refs/heads/master"
|
||||
// frequencies.go generation
|
||||
samplesDir = ".linguist/samples"
|
||||
frequenciesFile = "frequencies.go"
|
||||
frequenciesTmplPath = "internal/code-generator/assets/frequencies.go.tmpl"
|
||||
frequenciesTmpl = "frequencies.go.tmpl"
|
||||
|
||||
commitPath = ".linguist/.git/refs/heads/master"
|
||||
)
|
||||
|
||||
type generatorArgs struct {
|
||||
@ -88,6 +94,10 @@ func main() {
|
||||
log.Println(err)
|
||||
}
|
||||
}
|
||||
|
||||
if err := generator.Frequencies(samplesDir, frequenciesTmplPath, frequenciesTmpl, commit, frequenciesFile); err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
}
|
||||
|
||||
func getCommit(path string) (string, error) {
|
||||
|
Reference in New Issue
Block a user