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

Add Glue Service #109

Merged
merged 1 commit into from
Mar 11, 2018
Merged

Add Glue Service #109

merged 1 commit into from
Mar 11, 2018

Conversation

tomvachon
Copy link
Contributor

No description provided.

}

for _, classifier := range output.Classifiers {
if classifier.GrokClassifier != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You still could use a switch here. Something like this:

switch {
case classifier.GrokClassifier != nil:
    resources = append(resources, &GlueClassifier{
        svc:  svc,
        name: classifier.GrokClassifier.Name,
    })
case classifier.JsonClassifier != nil:
    resources = append(resources, &GlueClassifier{
        svc:  svc,
        name: classifier.JsonClassifier.Name,
    })
case classifier.XMLClassifier != nil:
    resources = append(resources, &GlueClassifier{
        svc:  svc,
        name: classifier.XMLClassifier.Name,
    })
}

I like the switch a bit more here, because as a reader it is more obvious, that only one block should be executed. Also note that Golang doesn't fall through by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, ill make a change

@svenwltr svenwltr merged commit fd0a1d3 into rebuy-de:master Mar 11, 2018
@tomvachon tomvachon deleted the feature/glue branch March 16, 2018 17:03
@svenwltr svenwltr added the kind/resource Adding or changing AWS resources. label Mar 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/resource Adding or changing AWS resources.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants