refactor: optimize fuzzy matching with lazy initialization (#2523)

This commit is contained in:
Valentin Maerten
2025-12-07 21:43:26 +01:00
committed by GitHub
parent b1814277c2
commit a40ddd4949
12 changed files with 64 additions and 10 deletions

View File

@@ -10,12 +10,13 @@ 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"`
Failfast bool `yaml:"failfast"`
Version *semver.Version `yaml:"version"`
Verbose *bool `yaml:"verbose"`
DisableFuzzy *bool `yaml:"disable-fuzzy"`
Concurrency *int `yaml:"concurrency"`
Remote Remote `yaml:"remote"`
Failfast bool `yaml:"failfast"`
Experiments map[string]int `yaml:"experiments"`
}
type Remote struct {
@@ -53,6 +54,7 @@ func (t *TaskRC) Merge(other *TaskRC) {
}
t.Verbose = cmp.Or(other.Verbose, t.Verbose)
t.DisableFuzzy = cmp.Or(other.DisableFuzzy, t.DisableFuzzy)
t.Concurrency = cmp.Or(other.Concurrency, t.Concurrency)
t.Failfast = cmp.Or(other.Failfast, t.Failfast)
}