From 6d460dd4ba93a0d1f2966c98fd7c2ad2be2d2744 Mon Sep 17 00:00:00 2001 From: Dmitriy Aleksandrov Date: Sun, 18 Oct 2026 18:15:16 +0300 Subject: [PATCH] docs: upgrading to v2: Parse returns the errors of the drivers Signed-off-by: Dmitriy Aleksandrov --- docs/upgrading.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/upgrading.md b/docs/upgrading.md index 61d270e..85dbb5b 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -13,3 +13,5 @@ v2 changes the module path and a few methods. The steps for the code of v1: 3. The zap adapter is the separate module, zap is not a dependency of the core anymore: `logger.NewZapLogger(l)` is `zaplogger.New(l)` from `github.com/insei/tinyconf/logger/zaplogger`, see [Logging](features/logging.md). 4. Fields of an [embedded struct](features/structs.md#embedded-structs) without the tag are on the level of the embedding struct, like in `encoding/json`. Check the keys of such fields in the files and the environment variables. + +5. `Parse` returns the errors: a value that can't be converted to the type of the field, a file that can't be read, a field with `required:"true"` without a value. v1 only logged them and returned `nil`. All fields are parsed anyway, the errors are returned as one error, see [Errors](features/manager.md#errors).