mirror of
https://github.com/EnumeratedDev/bpm.git
synced 2026-10-31 11:01:48 +00:00
Show arrays in multiple lines in readable info
This commit is contained in:
2 files changed
+9
-3
No files matched your search
@@ -329,12 +329,15 @@ func (entry *BPMDatabaseEntry) CreateReadableInfo(rootDir string, humanReadableS
|
||||
return
|
||||
}
|
||||
|
||||
if sort {
|
||||
// Sort array
|
||||
if sort {
|
||||
slices.Sort(array)
|
||||
}
|
||||
|
||||
ret = append(ret, fmt.Sprintf("%s: %s", label, strings.Join(array, ", ")))
|
||||
ret = append(ret, label+":")
|
||||
for _, val := range array {
|
||||
ret = append(ret, " - "+val)
|
||||
}
|
||||
}
|
||||
|
||||
ret = append(ret, "Name: "+entry.Info.Name)
|
||||
|
||||
@@ -546,7 +546,10 @@ func (pkgInfo *PackageInfo) CreateReadableInfo(rootDir string) string {
|
||||
return
|
||||
}
|
||||
|
||||
ret = append(ret, fmt.Sprintf("%s: %s", label, strings.Join(array, ", ")))
|
||||
ret = append(ret, label+":")
|
||||
for _, val := range array {
|
||||
ret = append(ret, " - "+val)
|
||||
}
|
||||
}
|
||||
|
||||
ret = append(ret, "Name: "+pkgInfo.Name)
|
||||
|
||||
Reference in new issue
Block a user