fix(decode): report the smallest unknown field deterministically
Assisted-by: GLM 5.3
This commit is contained in:
+2
-1
@@ -186,7 +186,8 @@ A typo such as `database_urls` then fails with
|
||||
`interpres: unknown field "database_urls" for main.Config` instead of a silent
|
||||
default-zero run. Strictness applies to every struct the decode reaches, at any
|
||||
depth, including struct elements inside slices; map destinations accept every
|
||||
key by nature.
|
||||
key by nature. When several keys are unknown, the message names the smallest
|
||||
one, so it does not depend on map iteration order.
|
||||
|
||||
### Cancellation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user