1
0
mirror of https://github.com/go-task/task.git synced 2025-07-11 01:20:45 +02:00

Refactor: Use early return

This commit is contained in:
Andrey Nering
2022-11-02 10:23:19 -03:00
parent fd71dfda6a
commit a990ffe53d

View File

@ -91,6 +91,9 @@ func (e *Executor) readTaskfile() error {
func (e *Executor) setupFuzzyModel() {
if e.Taskfile != nil {
return
}
model := fuzzy.NewModel()
model.SetThreshold(1) // because we want to build grammar based on every task name
@ -106,7 +109,6 @@ func (e *Executor) setupFuzzyModel() {
model.Train(words)
e.fuzzyModel = model
}
}
func (e *Executor) setupTempDir() error {
if e.TempDir != "" {