mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
update various commands to adapt the new Factory interface
This commit is contained in:
@@ -66,7 +66,7 @@ var (
|
||||
kubectl delete pods --all`)
|
||||
)
|
||||
|
||||
func NewCmdDelete(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||
func NewCmdDelete(f cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||
options := &resource.FilenameOptions{}
|
||||
|
||||
// retrieve a list of handled resources from printer as valid args
|
||||
@@ -108,7 +108,7 @@ func NewCmdDelete(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||
return cmd
|
||||
}
|
||||
|
||||
func RunDelete(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *resource.FilenameOptions) error {
|
||||
func RunDelete(f cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *resource.FilenameOptions) error {
|
||||
cmdNamespace, enforceNamespace, err := f.DefaultNamespace()
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -158,7 +158,7 @@ func RunDelete(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []str
|
||||
return DeleteResult(r, out, ignoreNotFound, shortOutput, mapper)
|
||||
}
|
||||
|
||||
func ReapResult(r *resource.Result, f *cmdutil.Factory, out io.Writer, isDefaultDelete, ignoreNotFound bool, timeout time.Duration, gracePeriod int, shortOutput bool, mapper meta.RESTMapper, quiet bool) error {
|
||||
func ReapResult(r *resource.Result, f cmdutil.Factory, out io.Writer, isDefaultDelete, ignoreNotFound bool, timeout time.Duration, gracePeriod int, shortOutput bool, mapper meta.RESTMapper, quiet bool) error {
|
||||
found := 0
|
||||
if ignoreNotFound {
|
||||
r = r.IgnoreErrors(errors.IsNotFound)
|
||||
|
||||
Reference in New Issue
Block a user