From 27099182e5727e0d87fb884f918f7831b8617a07 Mon Sep 17 00:00:00 2001 From: siyul-park Date: Wed, 13 Dec 2023 02:52:59 -0500 Subject: [PATCH] refactor: use method instead of private member --- pkg/scheme/scheme.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/scheme/scheme.go b/pkg/scheme/scheme.go index c2fa8e58..7f369748 100644 --- a/pkg/scheme/scheme.go +++ b/pkg/scheme/scheme.go @@ -99,7 +99,7 @@ func (s *Scheme) Decode(spec Spec) (node.Node, error) { } } - if codec, ok := s.codecs[kind]; ok { + if codec, ok := s.Codec(kind); ok { return codec.Decode(spec) } return nil, errors.WithStack(encoding.ErrUnsupportedValue)