MCPcopy
hub / github.com/Jguer/yay / CreateRepoLink

Function CreateRepoLink

pkg/text/text.go:68–86  ·  view source on GitHub ↗
(repo, arch, pkgName, text string)

Source from the content-addressed store, hash-verified

66}
67
68func CreateRepoLink(repo, arch, pkgName, text string) string {
69 if !UseColor {
70 return text
71 }
72
73 urlBase, ok := RepoUrls[repo]
74 if !ok {
75 return text
76 }
77
78 var url string
79 if repo == "aur" || repo == "devel" {
80 url = urlBase + "/" + pkgName
81 } else {
82 url = urlBase + "/" + arch + "/" + pkgName
83 }
84
85 return CreateOSC8Link(url, text)
86}

Callers 3

aurPkgSearchStringFunction · 0.92
syncPkgSearchStringFunction · 0.92
TestCreateRepoLinkFunction · 0.85

Calls 1

CreateOSC8LinkFunction · 0.85

Tested by 1

TestCreateRepoLinkFunction · 0.68