Merge pull request #9787 from feihujiang/acceptErrorLikeGoPath

Make a change to visitor to allow it to accept an error, like Go's pa…
This commit is contained in:
Zach Loafman
2015-08-21 15:17:58 -07:00
12 changed files with 128 additions and 101 deletions

View File

@@ -205,7 +205,10 @@ func RunGet(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string
}
// use the default printer for each object
return b.Do().Visit(func(r *resource.Info) error {
return b.Do().Visit(func(r *resource.Info, err error) error {
if err != nil {
return err
}
printer, err := f.PrinterForMapping(cmd, r.Mapping, allNamespaces)
if err != nil {
return err