remove unnecessary conversion check
package ssm
import (
- "fmt"
"github.com/concourse/concourse/atc/creds"
flags "github.com/jessevdk/go-flags"
"github.com/mitchellh/mapstructure"
@@ -29,9 +28,6 @@ func (factory *ssmManagerFactory) AddConfig(group *flags.Group) creds.Manager {
}
func (factory *ssmManagerFactory) NewInstance(config interface{}) (creds.Manager, error) {
- if c, ok := config.(map[string]interface{}); !ok {
- return nil, fmt.Errorf("invalid aws ssm config format")
- } else {
manager := &SsmManager{
TeamSecretTemplate: DefaultTeamSecretTemplate,
PipelineSecretTemplate: DefaultPipelineSecretTemplate,
@@ -45,11 +41,10 @@ func (factory *ssmManagerFactory) NewInstance(config interface{}) (creds.Manager
return nil, err
}
- err = decoder.Decode(c)
+ err = decoder.Decode(config)
if err != nil {
return nil, err
}
return manager, nil
}
-}
