Add test for mapTrackTitle

This commit is contained in:
Deluan
2022-12-30 15:13:04 -05:00
parent cc14485194
commit 80ded63d35
2 changed files with 26 additions and 5 deletions
+9 -5
View File
@@ -49,16 +49,20 @@ func Extract(files ...string) (map[string]Tags, error) {
}
tags = tags.Map(p.CustomMappings())
result[filePath] = Tags{
filePath: filePath,
fileInfo: fileInfo,
tags: tags,
}
result[filePath] = NewTag(filePath, fileInfo, tags)
}
return result, nil
}
func NewTag(filePath string, fileInfo os.FileInfo, tags ParsedTags) Tags {
return Tags{
filePath: filePath,
fileInfo: fileInfo,
tags: tags,
}
}
type ParsedTags map[string][]string
func (p ParsedTags) Map(customMappings ParsedTags) ParsedTags {