refactor: Remove redundant `NewPullWithOpts`

Signed-off-by: George Jenkins <gvjenkins@gmail.com>
pull/13538/head
George Jenkins 9 months ago committed by Payal Godhani
parent f8a08145fb
commit ca5a9e69c0

@ -43,7 +43,7 @@ result in an error, and the chart will not be saved locally.
` `
func newPullCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { func newPullCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
client := action.NewPullWithOpts(action.WithConfig(cfg)) client := action.NewPull(action.WithConfig(cfg))
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "pull [chart URL | repo/chartname] [...]", Use: "pull [chart URL | repo/chartname] [...]",

@ -56,13 +56,8 @@ func WithConfig(cfg *Configuration) PullOpt {
} }
} }
// NewPull creates a new Pull object. // NewPull creates a new Pull with configuration options.
func NewPull() *Pull { func NewPull(opts ...PullOpt) *Pull {
return NewPullWithOpts()
}
// NewPullWithOpts creates a new pull, with configuration options.
func NewPullWithOpts(opts ...PullOpt) *Pull {
p := &Pull{} p := &Pull{}
for _, fn := range opts { for _, fn := range opts {
fn(p) fn(p)

Loading…
Cancel
Save