WriteMetadataISO writes a metadata ISO file in a format usable by pkg/metadata
(path string, content []byte)
| 9 | |
| 10 | // WriteMetadataISO writes a metadata ISO file in a format usable by pkg/metadata |
| 11 | func WriteMetadataISO(path string, content []byte) error { |
| 12 | outfh, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY, 0644) |
| 13 | if err != nil { |
| 14 | return err |
| 15 | } |
| 16 | defer func() { _ = outfh.Close() }() |
| 17 | |
| 18 | return iso9660wrap.WriteBuffer(outfh, content, "config") |
| 19 | } |
| 20 | |
| 21 | func metadataCreateCmd() *cobra.Command { |
| 22 | cmd := &cobra.Command{ |
no test coverage detected