Skip to content

Commit

Permalink
Merge pull request #3360 from camilamacedo86/deprecated-bundle-func
Browse files Browse the repository at this point in the history
⚠️ (API) deprecate the old func to create a new BundlePlugin in favour of the new one, which uses as arg BundleOptions
  • Loading branch information
k8s-ci-robot committed Apr 22, 2023
2 parents 9ba9d57 + 9f62417 commit ccd8944
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/plugin/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ func WithDeprecationMessage(msg string) BundleOption {

// NewBundle creates a new Bundle with the provided name and version, and that wraps the provided plugins.
// The list of supported project versions is computed from the provided plugins.
//
// Deprecated: Use the NewBundle informing the options from now one. Replace its use for as the
// following example. Example:
//
// mylanguagev1Bundle, _ := plugin.NewBundle(plugin.WithName(language.DefaultNameQualifier),
// plugin.WithVersion(plugin.Version{Number: 1}),
// plugin.WithPlugins(kustomizecommonv1.Plugin{}, mylanguagev1.Plugin{}),
func NewBundle(name string, version Version, deprecateWarning string, plugins ...Plugin) (Bundle, error) {
supportedProjectVersions := CommonSupportedProjectVersions(plugins...)
if len(supportedProjectVersions) == 0 {
Expand Down

0 comments on commit ccd8944

Please sign in to comment.