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:
4
setup.go
4
setup.go
@ -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 != "" {
|
||||
|
Reference in New Issue
Block a user