mirror of https://github.com/k3s-io/k3s
More cleanup
parent
d73583552c
commit
eadb6b18ac
|
@ -71,9 +71,9 @@ type RolloutStatusOptions struct {
|
||||||
Revision int64
|
Revision int64
|
||||||
Timeout time.Duration
|
Timeout time.Duration
|
||||||
|
|
||||||
StatusViewer func(*meta.RESTMapping) (kubectl.StatusViewer, error)
|
StatusViewerFn func(*meta.RESTMapping) (kubectl.StatusViewer, error)
|
||||||
Builder func() *resource.Builder
|
Builder func() *resource.Builder
|
||||||
DynamicClient dynamic.Interface
|
DynamicClient dynamic.Interface
|
||||||
|
|
||||||
FilenameOptions *resource.FilenameOptions
|
FilenameOptions *resource.FilenameOptions
|
||||||
genericclioptions.IOStreams
|
genericclioptions.IOStreams
|
||||||
|
@ -127,9 +127,7 @@ func (o *RolloutStatusOptions) Complete(f cmdutil.Factory, args []string) error
|
||||||
}
|
}
|
||||||
|
|
||||||
o.BuilderArgs = args
|
o.BuilderArgs = args
|
||||||
o.StatusViewer = func(mapping *meta.RESTMapping) (kubectl.StatusViewer, error) {
|
o.StatusViewerFn = polymorphichelpers.StatusViewerFn
|
||||||
return polymorphichelpers.StatusViewerFn(mapping)
|
|
||||||
}
|
|
||||||
|
|
||||||
clientConfig, err := f.ToRESTConfig()
|
clientConfig, err := f.ToRESTConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -180,7 +178,7 @@ func (o *RolloutStatusOptions) Run() error {
|
||||||
info := infos[0]
|
info := infos[0]
|
||||||
mapping := info.ResourceMapping()
|
mapping := info.ResourceMapping()
|
||||||
|
|
||||||
statusViewer, err := o.StatusViewer(mapping)
|
statusViewer, err := o.StatusViewerFn(mapping)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue