diff 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
line wrap: on
line diff
--- a/pkg/imports/scheduled.go	Fri Jan 25 18:17:37 2019 +0100
+++ b/pkg/imports/scheduled.go	Fri Jan 25 18:24:14 2019 +0100
@@ -71,10 +71,8 @@
 	what := ctor()
 
 	// Fill the data structure
-	if um, ok := what.(common.AttributesUnmarshaler); ok {
-		if err := um.UnmarshalAttributes(cfg.Attributes); err != nil {
-			return 0, err
-		}
+	if err := cfg.Attributes.Unmarshal(what); err != nil {
+		return 0, err
 	}
 
 	converted := ConvertToInternal(kind, what)