Repository: helm/helm
File: pkg/plugin/plugin.go (Go)

Code before:

	// Usage is the single-line usage text shown in help
	Usage string `json:"usage"`

	// Description is a long description shown in places like `helm help`
	Description string `json:"description"`

	// PlatformCommand is the plugin command, with a platform selector and support for args.
	//
	// The command and args will be passed through environment expansion, so env vars can
	// be present in this command. Unless IgnoreFlags is set, this will
	// also merge the flags passed from Helm.
	//
	// Note that the command is not executed in a shell. To do so, we suggest
	// pointing the command to a shell script.
	//
	// The following rules will apply to processing platform commands:
	// - If PlatformCommand is present, it will be used
	// - If both OS and Arch match the current platform, search will stop and the command will be executed
	// - If OS matches and Arch is empty, the command will be executed
	// - If no OS/Arch match is found, the default command will be executed
	// - If no matches are found in platformCommand, Helm will exit with an error
	PlatformCommand []PlatformCommand `json:"platformCommand"`

	// Command is the plugin command, as a single string.
	// Providing a command will result in an deprecation warning if PlatformCommand is also set.
	//
	// The command will be passed through environment expansion, so env vars can
	// be present in this command. Unless IgnoreFlags is set, this will
	// also merge the flags passed from Helm.
	//
	// Note that command is not executed in a shell. To do so, we suggest
	// pointing the command to a shell script.
	//
	// DEPRECATED: Use PlatformCommand instead
	Command string `json:"command"`

	// IgnoreFlags ignores any flags passed in from Helm
	//
	// For example, if the plugin is invoked as `helm --debug myplugin`, if this
	// is false, `--debug` will be appended to `--command`. If this is true,
	// the `--debug` flag will be discarded.
	IgnoreFlags bool `json:"ignoreFlags"`

	// PlatformHooks are commands that will run on plugin events, with a platform selector and support for args.
	//
	// The command and args will be passed through environment expansion, so env vars can
	// be present in the command.
	//
	// Note that the command is not executed in a shell. To do so, we suggest
	// pointing the command to a shell script.

Review comment (suggestion):
```suggestion
	// Providing a platform and plugin command will result in an deprecation warning.
```

Code after:
	Version string `json:"version"`

	// Usage is the single-line usage text shown in help
	Usage string `json:"usage"`

	// Description is a long description shown in places like `helm help`
	Description string `json:"description"`

	// PlatformCommand is the plugin command, with a platform selector and support for args.
	//
	// The command and args will be passed through environment expansion, so env vars can
	// be present in this command. Unless IgnoreFlags is set, this will
	// also merge the flags passed from Helm.
	//
	// Note that the command is not executed in a shell. To do so, we suggest
	// pointing the command to a shell script.
	//
	// The following rules will apply to processing platform commands:
	// - If PlatformCommand is present, it will be used
	// - If both OS and Arch match the current platform, search will stop and the command will be executed
	// - If OS matches and Arch is empty, the command will be executed
	// - If no OS/Arch match is found, the default command will be executed
	// - If no matches are found in platformCommand, Helm will exit with an error
	PlatformCommand []PlatformCommand `json:"platformCommand"`

	// Command is the plugin command, as a single string.
	// Providing Command and PlatformCommand will result in a warning being emitted (PlatformCommand takes precedence).
	//
	// The command will be passed through environment expansion, so env vars can
	// be present in this command. Unless IgnoreFlags is set, this will
	// also merge the flags passed from Helm.
	//
	// Note that command is not executed in a shell. To do so, we suggest
	// pointing the command to a shell script.
	//
	// DEPRECATED: Use PlatformCommand instead
	Command string `json:"command"`

	// IgnoreFlags ignores any flags passed in from Helm
	//
	// For example, if the plugin is invoked as `helm --debug myplugin`, if this
	// is false, `--debug` will be appended to `--command`. If this is true,
	// the `--debug` flag will be discarded.
	IgnoreFlags bool `json:"ignoreFlags"`

	// PlatformHooks are commands that will run on plugin events, with a platform selector and support for args.
	//
	// The command and args will be passed through environment expansion, so env vars can
	// be present in the command.
	//
	// Note that the command is not executed in a shell. To do so, we suggest