From 42acdad9e541192185fe2ce64e72430ab032ca16 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Sun, 7 Jul 2019 14:12:22 -0600 Subject: Fix error handling with Validate when loading modules (fixes #2658) The return statement was improperly nested in context.go --- context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'context.go') diff --git a/context.go b/context.go index ea4f8a3..17488e4 100644 --- a/context.go +++ b/context.go @@ -138,8 +138,8 @@ func (ctx Context) LoadModule(name string, rawMsg json.RawMessage) (interface{}, if err2 != nil { err = fmt.Errorf("%v; additionally, cleanup: %v", err, err2) } - return nil, fmt.Errorf("%s: invalid configuration: %v", mod.Name, err) } + return nil, fmt.Errorf("%s: invalid configuration: %v", mod.Name, err) } } -- cgit v1.2.3