ficsit-cli-flake/cfg/test_defaults.go
Vilsol 5f2e60a9e2
feat: multi targets (#44)
* feat: use mod version targets

* chore: lint

* chore: remove unused

* chore: target dev on ci

* fix: rename WindowsNoEditor target to Windows
fix: close file reader

* fix: ensure closure of downloaded mod

* fix: ensure all important events are sent

* fix: lock adding files to cache

---------

Co-authored-by: mircearoata <mircearoatapalade@gmail.com>
2023-12-07 18:57:31 +02:00

21 lines
762 B
Go

package cfg
import (
"path/filepath"
"runtime"
"github.com/spf13/viper"
)
func SetDefaults() {
_, file, _, _ := runtime.Caller(0)
viper.SetDefault("cache-dir", filepath.Clean(filepath.Join(filepath.Dir(file), "../", "testdata", "cache")))
viper.SetDefault("local-dir", filepath.Clean(filepath.Join(filepath.Dir(file), "../", "testdata", "local")))
viper.SetDefault("base-local-dir", filepath.Clean(filepath.Join(filepath.Dir(file), "../", "testdata")))
viper.SetDefault("profiles-file", "profiles.json")
viper.SetDefault("installations-file", "installations.json")
viper.SetDefault("dry-run", false)
viper.SetDefault("api-base", "https://api.ficsit.dev")
viper.SetDefault("graphql-api", "/v2/query")
viper.SetDefault("concurrent-downloads", 5)
}