From dc00932983304eb6d423a055b8a1a3b42e6e2367 Mon Sep 17 00:00:00 2001 From: AJ Bahnken Date: Mon, 8 Jun 2020 11:17:37 -0700 Subject: [PATCH] fix type switch in loadConfigForSubcommand --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 86850a72..d963eba9 100644 --- a/main.go +++ b/main.go @@ -175,13 +175,13 @@ func loadConfigForSubcommand(c *cli.Context, module modules.Module) (conf, []mod } var moduleConfigs []modules.Configuration - switch module { - case module.(*aws.AWSModule): + switch module.(type) { + case *aws.AWSModule: moduleConfigs = make([]modules.Configuration, len(cfg.Aws)) for i, c := range cfg.Aws { moduleConfigs[i] = c } - case module.(*authorizedkeys.AuthorizedKeysModule): + case *authorizedkeys.AuthorizedKeysModule: moduleConfigs = make([]modules.Configuration, len(cfg.AuthorizedKeys)) for i, c := range cfg.AuthorizedKeys { moduleConfigs[i] = c