feat: Add generic persister for metadata

This commit is contained in:
Felicitas Pojtinger
2021-11-21 00:50:11 +01:00
parent ddadeace61
commit a413ba8fa5
4 changed files with 132 additions and 70 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ func PrintCSV(input []string) error {
return w.WriteAll([][]string{input})
}
func GetTARHeaderAsCSV(record int64, block int64, hdr *tar.Header) []string {
func GetTARHeaderAsCSV(record, block int64, hdr *tar.Header) []string {
return []string{
fmt.Sprintf("%v", record), fmt.Sprintf("%v", block), fmt.Sprintf("%v", hdr.Typeflag), hdr.Name, hdr.Linkname, fmt.Sprintf("%v", hdr.Size), fmt.Sprintf("%v", hdr.Mode), fmt.Sprintf("%v", hdr.Uid), fmt.Sprintf("%v", hdr.Gid), fmt.Sprintf("%v", hdr.Uname), fmt.Sprintf("%v", hdr.Gname), hdr.ModTime.Format(time.RFC3339), hdr.AccessTime.Format(time.RFC3339), hdr.ChangeTime.Format(time.RFC3339), fmt.Sprintf("%v", hdr.Devmajor), fmt.Sprintf("%v", hdr.Devminor), fmt.Sprintf("%v", hdr.PAXRecords), fmt.Sprintf("%v", hdr.Format),
}