From dba4b4007d15e65ad1bd833a437bebd68ce5b35c Mon Sep 17 00:00:00 2001 From: longxboy Date: Tue, 20 Jul 2021 16:09:57 +0800 Subject: [PATCH] update WithDecoder comment --- config/options.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/options.go b/config/options.go index de214c42b..6a340b994 100644 --- a/config/options.go +++ b/config/options.go @@ -33,6 +33,10 @@ func WithSource(s ...Source) Option { } // WithDecoder with config decoder. +// DefaultDecoder behavior: +// If KeyValue.Format is non-empty, then KeyValue.Value will be deserialized into map[string]interface{} +// and stored in the config cache(map[string]interface{}) +// if KeyValue.Format is empty,{KeyValue.Key : KeyValue.Value} will be stored in config cache(map[string]interface{}) func WithDecoder(d Decoder) Option { return func(o *options) { o.decoder = d