mirror of
https://github.com/Jguer/yay
synced 2024-09-01 14:18:39 +00:00
Different colors for AUR/repo packages
This commit is contained in:
parent
3df03c3291
commit
27c99a566b
14
print.go
14
print.go
|
@ -100,8 +100,10 @@ func printDownloadsFromRepo(repoType string, repo []*alpm.Package) {
|
|||
for _, v := range repo {
|
||||
packages += v.Name() + " "
|
||||
}
|
||||
repoInfo := boldBlueFg(
|
||||
"[" + repoType + ", " + strconv.Itoa(len(repo)) + " packages] ")
|
||||
if len(repo) > 0 {
|
||||
printDownloads(repoType, packages, len(repo))
|
||||
printDownloads(repoInfo, packages)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,15 +113,15 @@ func printDownloadsFromAur(repoType string, repo []*rpc.Pkg) {
|
|||
for _, v := range repo {
|
||||
packages += v.Name + " "
|
||||
}
|
||||
repoInfo := redFg(
|
||||
"[" + repoType + ", " + strconv.Itoa(len(repo)) + " packages] ")
|
||||
if len(repo) > 0 {
|
||||
printDownloads(repoType, packages, len(repo))
|
||||
printDownloads(repoInfo, packages)
|
||||
}
|
||||
}
|
||||
|
||||
func printDownloads(repoType, packages string, numPackages int) {
|
||||
fmt.Println(
|
||||
redFg("["+repoType+", "+strconv.Itoa(numPackages)+" packages] ") +
|
||||
yellowFg(packages))
|
||||
func printDownloads(repoInfo, packages string) {
|
||||
fmt.Println(repoInfo + yellowFg(packages))
|
||||
}
|
||||
|
||||
func printDeps(repoDeps []string, aurDeps []string) {
|
||||
|
|
Loading…
Reference in a new issue