1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 18:15:42 +01:00

Rename config.check to config.prepare to make symmerical to other tools.

This commit is contained in:
Sascha L. Teichmann 2023-08-01 21:45:30 +02:00
parent 98bf2990ae
commit 85f9d02ac0
2 changed files with 3 additions and 2 deletions

View file

@ -307,7 +307,8 @@ func (c *config) setDefaults() {
} }
} }
func (c *config) check() error { // prepare prepares internal state of a loaded configuration.
func (c *config) prepare() error {
if len(c.Providers) == 0 { if len(c.Providers) == 0 {
return errors.New("no providers given in configuration") return errors.New("no providers given in configuration")
} }

View file

@ -56,7 +56,7 @@ func lock(lockFile *string, fn func() error) error {
func main() { func main() {
_, cfg, err := parseArgsConfig() _, cfg, err := parseArgsConfig()
options.ErrorCheck(err) options.ErrorCheck(err)
options.ErrorCheck(cfg.check()) options.ErrorCheck(cfg.prepare())
p := processor{cfg: cfg} p := processor{cfg: cfg}
errCheck(lock(cfg.LockFile, p.process)) errCheck(lock(cfg.LockFile, p.process))