Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #61 from mozilla-services/ajvb/diff-module-panic-fix
Browse files Browse the repository at this point in the history
fix type switch in loadConfigForSubcommand
  • Loading branch information
ajvb authored Jun 8, 2020
2 parents e5419dc + dc00932 commit 9625999
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9625999

Please sign in to comment.