From 53bd0647a7f06ba84eb494b16e6ec8cf2b994921 Mon Sep 17 00:00:00 2001 From: Justin Kaseman Date: Thu, 12 Dec 2024 09:04:10 -0800 Subject: [PATCH] Amend example documnetation --- pkg/codec/config.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/codec/config.go b/pkg/codec/config.go index c9735242d..21b6cca04 100644 --- a/pkg/codec/config.go +++ b/pkg/codec/config.go @@ -223,7 +223,7 @@ func (h *HardCodeModifierConfig) MarshalJSON() ([]byte, error) { // And the fields config defined as: // {"A": "string C, string D"} // -// The codec factory function returns a RemoteCodec that provides an implementation for encoding/decoding +// The codec config gives a map of strings (the values from fields config map) to implementation for encoding/decoding // // RemoteCodec { // func (types.TypeProvider) CreateType(itemType string, forEncoding bool) (any, error) @@ -233,9 +233,7 @@ func (h *HardCodeModifierConfig) MarshalJSON() ([]byte, error) { // func (types.Encoder) GetMaxEncodingSize(ctx context.Context, n int, itemType string) (int, error) // } // -// func (typeDef string) RemoteCodec { -// return someCodec.New(typeDef) -// } +// {"string C, string D": RemoteCodec} // // Result: // type example struct {