Mercurial > gemma
changeset 4906:21fea90f4002 fairway-marks-import
Avoid unnecessary pointer to pointer
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 07 Feb 2020 12:35:11 +0100 |
parents | 8cb201b551b3 |
children | 644cb7c175f3 |
files | pkg/imports/fm.go |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 }