1
0
mirror of https://github.com/go-task/task.git synced 2025-11-25 22:32:55 +02:00

refactor: lazy load fuzzy model & ability to disable it

This commit is contained in:
Valentin Maerten
2025-11-23 21:12:25 +01:00
parent f29d718b03
commit 876bb33de2
11 changed files with 81 additions and 26 deletions

View File

@@ -9,11 +9,12 @@ import (
)
type TaskRC struct {
Version *semver.Version `yaml:"version"`
Verbose *bool `yaml:"verbose"`
Concurrency *int `yaml:"concurrency"`
Remote Remote `yaml:"remote"`
Experiments map[string]int `yaml:"experiments"`
Version *semver.Version `yaml:"version"`
Verbose *bool `yaml:"verbose"`
DisableFuzzy *bool `yaml:"disable-fuzzy"`
Concurrency *int `yaml:"concurrency"`
Remote Remote `yaml:"remote"`
Experiments map[string]int `yaml:"experiments"`
}
type Remote struct {
@@ -44,5 +45,6 @@ func (t *TaskRC) Merge(other *TaskRC) {
t.Remote.CacheExpiry = cmp.Or(other.Remote.CacheExpiry, t.Remote.CacheExpiry)
t.Verbose = cmp.Or(other.Verbose, t.Verbose)
t.DisableFuzzy = cmp.Or(other.DisableFuzzy, t.DisableFuzzy)
t.Concurrency = cmp.Or(other.Concurrency, t.Concurrency)
}