()
| 19 | } |
| 20 | |
| 21 | func metadataCreateCmd() *cobra.Command { |
| 22 | cmd := &cobra.Command{ |
| 23 | Use: "create", |
| 24 | Short: "create an ISO with metadata", |
| 25 | Long: `Create an ISO file with metadata in it. |
| 26 | Provided metadata will be written to '/config' in the ISO. |
| 27 | This is compatible with the linuxkit/metadata package.`, |
| 28 | Args: cobra.ExactArgs(2), |
| 29 | Example: "linuxkit metadata create file.iso \"metadata\"", |
| 30 | RunE: func(cmd *cobra.Command, args []string) error { |
| 31 | isoImage := args[0] |
| 32 | metadata := args[1] |
| 33 | |
| 34 | return WriteMetadataISO(isoImage, []byte(metadata)) |
| 35 | }, |
| 36 | } |
| 37 | |
| 38 | return cmd |
| 39 | } |
| 40 | |
| 41 | func metadataCmd() *cobra.Command { |
| 42 |
no test coverage detected