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

Commit

Permalink
fix type switch in loadConfigForSubcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
ajvb committed Jun 8, 2020
1 parent e5419dc commit dc00932
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 dc00932

Please sign in to comment.