1
0
mirror of synced 2026-04-02 22:06:56 +00:00

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:
Michael Bridgen
2020-12-04 12:30:20 +00:00
parent 52145c045d
commit 4f52b77563
5 changed files with 160 additions and 135 deletions

View File

@@ -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