# HG changeset patch # User Tom Gottfried # Date 1581075311 -3600 # Node ID 21fea90f40026b77b0f22de26517b9f178b93c04 # Parent 8cb201b551b35d6988dfe2c9511c27993a5e0d87 Avoid unnecessary pointer to pointer diff -r 8cb201b551b3 -r 21fea90f4002 pkg/imports/fm.go --- a/pkg/imports/fm.go Fri Feb 07 12:23:46 2020 +0100 +++ b/pkg/imports/fm.go Fri Feb 07 12:35:11 2020 +0100 @@ -59,7 +59,8 @@ func getFMFeatures( feedback Feedback, fm FairwayMarks, - // Constructor returning a struct representing featuretype's properties + // Constructor returning pointer to struct + // representing featuretype's properties newProps func() interface{}, ) ( // Elements can be converted to []interface{}{p, fp} with @@ -134,7 +135,7 @@ } props := newProps() - if err := json.Unmarshal(*feature.Properties, &props); err != nil { + if err := json.Unmarshal(*feature.Properties, props); err != nil { badProperties++ continue }