Skip to content

Commit

Permalink
Fix versioned switch statements
Browse files Browse the repository at this point in the history
  • Loading branch information
asalkeld committed Nov 13, 2019
1 parent 67cb32d commit bc6bf29
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/arm/arm.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
v10 "github.com/openshift/openshift-azure/pkg/arm/v10"
v11 "github.com/openshift/openshift-azure/pkg/arm/v11"
v12 "github.com/openshift/openshift-azure/pkg/arm/v12"
v13 "github.com/openshift/openshift-azure/pkg/arm/v13"
v7 "github.com/openshift/openshift-azure/pkg/arm/v7"
v71 "github.com/openshift/openshift-azure/pkg/arm/v71"
v9 "github.com/openshift/openshift-azure/pkg/arm/v9"
Expand All @@ -42,6 +43,8 @@ func New(ctx context.Context, log *logrus.Entry, cs *api.OpenShiftManagedCluster
return v11.New(ctx, log, cs, testConfig), nil
case "v12.0":
return v12.New(ctx, log, cs, testConfig), nil
case "v13.0":
return v13.New(ctx, log, cs, testConfig), nil
}

return nil, fmt.Errorf("version %q not found", cs.Config.PluginVersion)
Expand Down
3 changes: 3 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
v10 "github.com/openshift/openshift-azure/pkg/config/v10"
v11 "github.com/openshift/openshift-azure/pkg/config/v11"
v12 "github.com/openshift/openshift-azure/pkg/config/v12"
v13 "github.com/openshift/openshift-azure/pkg/config/v13"
v7 "github.com/openshift/openshift-azure/pkg/config/v7"
v71 "github.com/openshift/openshift-azure/pkg/config/v71"
v9 "github.com/openshift/openshift-azure/pkg/config/v9"
Expand All @@ -39,6 +40,8 @@ func New(cs *api.OpenShiftManagedCluster) (Interface, error) {
return v11.New(cs), nil
case "v12.0":
return v12.New(cs), nil
case "v13.0":
return v13.New(cs), nil
}

return nil, fmt.Errorf("version %q not found", cs.Config.PluginVersion)
Expand Down
3 changes: 3 additions & 0 deletions pkg/startup/startup.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
v10 "github.com/openshift/openshift-azure/pkg/startup/v10"
v11 "github.com/openshift/openshift-azure/pkg/startup/v11"
v12 "github.com/openshift/openshift-azure/pkg/startup/v12"
v13 "github.com/openshift/openshift-azure/pkg/startup/v13"
v7 "github.com/openshift/openshift-azure/pkg/startup/v7"
v71 "github.com/openshift/openshift-azure/pkg/startup/v71"
v9 "github.com/openshift/openshift-azure/pkg/startup/v9"
Expand Down Expand Up @@ -43,6 +44,8 @@ func New(log *logrus.Entry, cs *api.OpenShiftManagedCluster, testConfig api.Test
return v11.New(log, cs, testConfig), nil
case "v12.0":
return v12.New(log, cs, testConfig), nil
case "v13.0":
return v13.New(log, cs, testConfig), nil
}

return nil, fmt.Errorf("version %q not found", cs.Config.PluginVersion)
Expand Down
3 changes: 3 additions & 0 deletions pkg/sync/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
v10 "github.com/openshift/openshift-azure/pkg/sync/v10"
v11 "github.com/openshift/openshift-azure/pkg/sync/v11"
v12 "github.com/openshift/openshift-azure/pkg/sync/v12"
v13 "github.com/openshift/openshift-azure/pkg/sync/v13"
v7 "github.com/openshift/openshift-azure/pkg/sync/v7"
v71 "github.com/openshift/openshift-azure/pkg/sync/v71"
v9 "github.com/openshift/openshift-azure/pkg/sync/v9"
Expand All @@ -37,6 +38,8 @@ func New(log *logrus.Entry, cs *api.OpenShiftManagedCluster, initClients bool) (
return v11.New(log, cs, initClients)
case "v12.0":
return v12.New(log, cs, initClients)
case "v13.0":
return v13.New(log, cs, initClients)
}

return nil, fmt.Errorf("version %q not found", cs.Config.PluginVersion)
Expand Down

0 comments on commit bc6bf29

Please sign in to comment.