Allow resource.Builder commands to take arguments by type/name

Will allow xarg behavior to fetch resources across multiple types.
Changes 'create', 'get', 'update', 'stop', and 'delete' to output
<resourceType>/<name>.
This commit is contained in:
Clayton Coleman
2015-03-25 01:01:07 -04:00
parent a34f39aee4
commit 581d7cd789
16 changed files with 343 additions and 46 deletions

View File

@@ -99,7 +99,7 @@ func RunCreate(f *Factory, out io.Writer, cmd *cobra.Command, filenames util.Str
}
count++
info.Refresh(obj, true)
fmt.Fprintf(out, "%s\n", info.Name)
fmt.Fprintf(out, "%s/%s\n", info.Mapping.Resource, info.Name)
return nil
})
if err != nil {