Use options when calling check or init (#199)

This commit is contained in:
Chosto
2022-09-13 15:15:02 +02:00
committed by GitHub
parent 83eeb847ac
commit b830667264
3 changed files with 19 additions and 5 deletions

View File

@@ -303,7 +303,17 @@ func getOptions(options Options, keys []string) []string {
return selected
}
func combineOptions(key string, l Location, b Backend) []string {
func combineBackendOptions(key string, b Backend) []string {
// Priority: backend > global
var options []string
gFlags := getOptions(GetConfig().Global, []string{key})
bFlags := getOptions(b.Options, []string{"all", key})
options = append(options, gFlags...)
options = append(options, bFlags...)
return options
}
func combineAllOptions(key string, l Location, b Backend) []string {
// Priority: location > backend > global
var options []string
gFlags := getOptions(GetConfig().Global, []string{key})