mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Rename config.check to config.prepare to make symmerical to other tools.
This commit is contained in:
parent
98bf2990ae
commit
85f9d02ac0
2 changed files with 3 additions and 2 deletions
|
|
@ -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")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue