Mercurial > gemma
comparison pkg/imports/scheduled.go @ 2047:78002c5e838c unify_imports
Imports: Code simplification.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 25 Jan 2019 18:24:14 +0100 |
parents | ea0b62b7656b |
children | 78ec61acf72e |
comparison
equal
deleted
inserted
replaced
2046:725884a4c89a | 2047:78002c5e838c |
---|---|
69 } | 69 } |
70 | 70 |
71 what := ctor() | 71 what := ctor() |
72 | 72 |
73 // Fill the data structure | 73 // Fill the data structure |
74 if um, ok := what.(common.AttributesUnmarshaler); ok { | 74 if err := cfg.Attributes.Unmarshal(what); err != nil { |
75 if err := um.UnmarshalAttributes(cfg.Attributes); err != nil { | 75 return 0, err |
76 return 0, err | |
77 } | |
78 } | 76 } |
79 | 77 |
80 converted := ConvertToInternal(kind, what) | 78 converted := ConvertToInternal(kind, what) |
81 if converted == nil { | 79 if converted == nil { |
82 return 0, fmt.Errorf("Conversion of model for kind '%s' failed.", kind) | 80 return 0, fmt.Errorf("Conversion of model for kind '%s' failed.", kind) |