mirror of
https://github.com/EnumeratedDev/bpm.git
synced 2026-09-16 10:36:12 +00:00
Hide URL and license from readable info if empty
This commit is contained in:
@@ -299,8 +299,12 @@ func (entry *BPMDatabaseEntry) CreateReadableInfo(rootDir string) string {
|
||||
ret = append(ret, "Database: "+entry.Database.Name)
|
||||
ret = append(ret, "Description: "+entry.Info.Description)
|
||||
ret = append(ret, "Version: "+entry.Info.GetFullVersion())
|
||||
ret = append(ret, "URL: "+entry.Info.Url)
|
||||
ret = append(ret, "License: "+entry.Info.License)
|
||||
if entry.Info.Url != "" {
|
||||
ret = append(ret, "URL: "+entry.Info.Url)
|
||||
}
|
||||
if entry.Info.License != "" {
|
||||
ret = append(ret, "License: "+entry.Info.License)
|
||||
}
|
||||
ret = append(ret, "Architecture: "+entry.Info.Arch)
|
||||
if entry.Info.Type == "source" && entry.Info.OutputArch != "" && entry.Info.OutputArch != GetArch() {
|
||||
ret = append(ret, "Output architecture: "+entry.Info.OutputArch)
|
||||
|
||||
@@ -523,8 +523,12 @@ func (pkgInfo *PackageInfo) CreateReadableInfo(rootDir string) string {
|
||||
ret = append(ret, "Name: "+pkgInfo.Name)
|
||||
ret = append(ret, "Description: "+pkgInfo.Description)
|
||||
ret = append(ret, "Version: "+pkgInfo.GetFullVersion())
|
||||
ret = append(ret, "URL: "+pkgInfo.Url)
|
||||
ret = append(ret, "License: "+pkgInfo.License)
|
||||
if pkgInfo.Url != "" {
|
||||
ret = append(ret, "URL: "+pkgInfo.Url)
|
||||
}
|
||||
if pkgInfo.License != "" {
|
||||
ret = append(ret, "License: "+pkgInfo.License)
|
||||
}
|
||||
ret = append(ret, "Architecture: "+pkgInfo.Arch)
|
||||
if pkgInfo.Type == "source" && pkgInfo.OutputArch != "" && pkgInfo.OutputArch != GetArch() {
|
||||
ret = append(ret, "Output architecture: "+pkgInfo.Arch)
|
||||
|
||||
Reference in New Issue
Block a user