Skip to content

Commit ccd8944

Browse files
authored
Merge pull request #3360 from camilamacedo86/deprecated-bundle-func
⚠️ (API) deprecate the old func to create a new BundlePlugin in favour of the new one, which uses as arg BundleOptions
2 parents 9ba9d57 + 9f62417 commit ccd8944

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/plugin/bundle.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ func WithDeprecationMessage(msg string) BundleOption {
6060

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

0 commit comments

Comments
 (0)