()
| 68 | } |
| 69 | |
| 70 | func (o *MetadataExportOptions) Run() error { |
| 71 | var op errors.Op = "commands.MetadataExportOptions.Run" |
| 72 | if len(o.output) != 0 { |
| 73 | if err := getMetadataFromServerAndWriteToStdoutByFormat(o.EC, rawOutputFormat(o.output)); err != nil { |
| 74 | return errors.E(op, err) |
| 75 | } |
| 76 | return nil |
| 77 | } |
| 78 | if err := getMetadataModeHandler(o.EC.MetadataMode).Export(o); err != nil { |
| 79 | return errors.E(op, err) |
| 80 | } |
| 81 | return nil |
| 82 | } |
| 83 | |
| 84 | func getMetadataFromServerAndWriteToStdoutByFormat(ec *cli.ExecutionContext, format rawOutputFormat) error { |
| 85 | var op errors.Op = "commands.getMetadataFromServerAndWriteToStdoutByFormat" |
no test coverage detected