From ac4cc4ad48ba4df5f1961767923776a90ce95375 Mon Sep 17 00:00:00 2001 From: leo Date: Sat, 13 May 2023 21:33:55 +0200 Subject: [PATCH] config: expand comment [skip ci] --- config/config.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/config/config.go b/config/config.go index cc3ff5e..b764e1d 100644 --- a/config/config.go +++ b/config/config.go @@ -86,9 +86,17 @@ func Load(conf string, isPath bool) (*Config, error) { } } - // only return now, one we had a chance to print the loaded config (as - // would be the case if the config adhered to the schema but our type - // definition above didn't - "don't know how to decode into ...") + // only return now (if err), after we've had the chance to print the loaded + // config, as would be the case if the config *did* adhere to the schema imported + // but app's Config type definition above didn't - "don't know how to + // decode into ..." is the most likely outcome in that case and it + // could be the product of (at least) three things: + // * completely wrong config not following the schema + // * config is following a newer schema than the app supports + // * config is following an older schema than the app supports + // + // NOTE: for the most part the only thing checked above would be adherence + // to config schema (apart from *some* value validation). if err != nil { return nil, err }