Factor out export command control flow
The export command works the same way for most (all?) types. I have
made it generic and moved it into export.go, then ported
{export,create}_auto_image{repository,policy}.go to use it.
Signed-off-by: Michael Bridgen <michael@weave.works>
This commit is contained in:
@@ -103,7 +103,7 @@ func createAutoImageRepositoryRun(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
if export {
|
||||
return exportImageRepo(repo) // defined with export command
|
||||
return printExport(exportImageRepository(&repo))
|
||||
}
|
||||
|
||||
// I don't need these until attempting to upsert the object, but
|
||||
|
||||
Reference in New Issue
Block a user