From 85f9d02ac080fbdd17901e431c8a2515f267f786 Mon Sep 17 00:00:00 2001 From: "Sascha L. Teichmann" Date: Tue, 1 Aug 2023 21:45:30 +0200 Subject: [PATCH] Rename config.check to config.prepare to make symmerical to other tools. --- cmd/csaf_aggregator/config.go | 3 ++- cmd/csaf_aggregator/main.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/csaf_aggregator/config.go b/cmd/csaf_aggregator/config.go index da91c2f..27f1336 100644 --- a/cmd/csaf_aggregator/config.go +++ b/cmd/csaf_aggregator/config.go @@ -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 { return errors.New("no providers given in configuration") } diff --git a/cmd/csaf_aggregator/main.go b/cmd/csaf_aggregator/main.go index d626192..3411edc 100644 --- a/cmd/csaf_aggregator/main.go +++ b/cmd/csaf_aggregator/main.go @@ -56,7 +56,7 @@ func lock(lockFile *string, fn func() error) error { func main() { _, cfg, err := parseArgsConfig() options.ErrorCheck(err) - options.ErrorCheck(cfg.check()) + options.ErrorCheck(cfg.prepare()) p := processor{cfg: cfg} errCheck(lock(cfg.LockFile, p.process))