refactor(conf): avoid type assertion in map case branch (#749)

Simplifies the code by using the type switch variable binding instead of
performing an additional type assertion.

Signed-off-by: Ville Vesilehto <[email protected]>
Co-authored-by: Anton Medvedev <[email protected]>
This commit is contained in:
Ville Vesilehto
2025-03-07 16:42:00 +01:00
committed by GitHub
co-authored by Anton Medvedev
parent f1b80c01df
commit 45bc3f7595
+2 -2
View File
@@ -46,9 +46,9 @@ func Env(env any) Nature {
face := elem.Interface()
switch face.(type) {
switch face := face.(type) {
case types.Map:
n.Fields[key.String()] = face.(types.Map).Nature()
n.Fields[key.String()] = face.Nature()
default:
if face == nil {