- removed not used call of sval.String() from migrateEmailTemplates

- Added pointer as second argument of Unmarshal call in MarshalYAML
This commit is contained in:
vicky
2021-03-28 09:25:55 +02:00
committed by Denis Arh
parent f9501893af
commit 126034f0f6
2 changed files with 3 additions and 2 deletions
+3 -1
View File
@@ -97,7 +97,9 @@ func (n *composeModule) Encode(ctx context.Context, doc *Document, state *envoy.
func (c *composeModule) MarshalYAML() (interface{}, error) {
// Get a struct from the raw JSON string
auxMeta := make(map[string]interface{})
json.Unmarshal(c.res.Meta, auxMeta)
if err := json.Unmarshal(c.res.Meta, &auxMeta); err != nil {
return nil, err
}
nn, err := makeMap(
"handle", c.res.Handle,
@@ -81,7 +81,6 @@ func migrateEmailTemplates(ctx context.Context, log *zap.Logger, s store.Storer)
continue
}
sval.String()
tmpl.ID = id.Next()
tmpl.CreatedAt = time.Now()
tmpl.Template = sval.String()