update to micro v3.1.2

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-01-19 03:16:37 +03:00
parent 587f57835e
commit 369a16afd9
3 changed files with 5 additions and 4 deletions

View File

@@ -11,6 +11,7 @@ import (
"github.com/imdario/mergo"
"github.com/unistack-org/micro/v3/codec"
"github.com/unistack-org/micro/v3/config"
rutil "github.com/unistack-org/micro/v3/util/reflect"
)
var (
@@ -64,7 +65,7 @@ func (c *fileConfig) Load(ctx context.Context) error {
var buf []byte
buf, err = ioutil.ReadAll(io.LimitReader(fp, int64(codec.DefaultMaxMsgSize)))
if err == nil {
src, err := config.Zero(c.opts.Struct)
src, err := rutil.Zero(c.opts.Struct)
if err == nil {
err = c.opts.Codec.Unmarshal(buf, src)
if err == nil {