Skip to content

Commit

Permalink
⚠️ (API) deprecate old func to create new BunlePlugin in favor of the…
Browse files Browse the repository at this point in the history
… new one which uses as arg BundleOptinos
  • Loading branch information
camilamacedo86 committed Apr 22, 2023
1 parent 9ba9d57 commit 9f62417
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 9f62417

Please sign in to comment.