aboutsummaryrefslogtreecommitdiffstats
path: root/models/packages/package.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2023-05-14 17:38:40 +0200
committerGitHub <noreply@github.com>2023-05-14 23:38:40 +0800
commit5968c63a11c94b0fdde0485af194bebb2ea1b8e7 (patch)
tree8ff60c459712755a7346c4f5ed2e31e464af6cbe /models/packages/package.go
parent53a00017bbd89fddab11b323fc39872c44286d96 (diff)
downloadgitea-5968c63a11c94b0fdde0485af194bebb2ea1b8e7.tar.gz
gitea-5968c63a11c94b0fdde0485af194bebb2ea1b8e7.zip
Add Go package registry (#24687)
Fixes #7608 This PR adds a Go package registry usable with the Go proxy protocol. ![grafik](https://github.com/go-gitea/gitea/assets/1666336/328feb5c-3df2-4f9d-8eae-fe3126d14c37)
Diffstat (limited to 'models/packages/package.go')
-rw-r--r--models/packages/package.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/models/packages/package.go b/models/packages/package.go
index 17d4d79f30..2dfed78046 100644
--- a/models/packages/package.go
+++ b/models/packages/package.go
@@ -39,6 +39,7 @@ const (
TypeContainer Type = "container"
TypeDebian Type = "debian"
TypeGeneric Type = "generic"
+ TypeGo Type = "go"
TypeHelm Type = "helm"
TypeMaven Type = "maven"
TypeNpm Type = "npm"
@@ -61,6 +62,7 @@ var TypeList = []Type{
TypeContainer,
TypeDebian,
TypeGeneric,
+ TypeGo,
TypeHelm,
TypeMaven,
TypeNpm,
@@ -94,6 +96,8 @@ func (pt Type) Name() string {
return "Debian"
case TypeGeneric:
return "Generic"
+ case TypeGo:
+ return "Go"
case TypeHelm:
return "Helm"
case TypeMaven:
@@ -139,6 +143,8 @@ func (pt Type) SVGName() string {
return "gitea-debian"
case TypeGeneric:
return "octicon-package"
+ case TypeGo:
+ return "gitea-go"
case TypeHelm:
return "gitea-helm"
case TypeMaven: