diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2023-05-14 17:38:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-14 23:38:40 +0800 |
commit | 5968c63a11c94b0fdde0485af194bebb2ea1b8e7 (patch) | |
tree | 8ff60c459712755a7346c4f5ed2e31e464af6cbe /services | |
parent | 53a00017bbd89fddab11b323fc39872c44286d96 (diff) | |
download | gitea-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 'services')
-rw-r--r-- | services/forms/package_form.go | 2 | ||||
-rw-r--r-- | services/packages/packages.go | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/services/forms/package_form.go b/services/forms/package_form.go index 96209ec840..dfec98fff4 100644 --- a/services/forms/package_form.go +++ b/services/forms/package_form.go @@ -15,7 +15,7 @@ import ( type PackageCleanupRuleForm struct { ID int64 Enabled bool - Type string `binding:"Required;In(alpine,cargo,chef,composer,conan,conda,container,debian,generic,helm,maven,npm,nuget,pub,pypi,rpm,rubygems,swift,vagrant)"` + Type string `binding:"Required;In(alpine,cargo,chef,composer,conan,conda,container,debian,generic,go,helm,maven,npm,nuget,pub,pypi,rpm,rubygems,swift,vagrant)"` KeepCount int `binding:"In(0,1,5,10,25,50,100)"` KeepPattern string `binding:"RegexPattern"` RemoveDays int `binding:"In(0,7,14,30,60,90,180)"` diff --git a/services/packages/packages.go b/services/packages/packages.go index bf64890f4e..9d5ce04a0e 100644 --- a/services/packages/packages.go +++ b/services/packages/packages.go @@ -369,6 +369,8 @@ func CheckSizeQuotaExceeded(ctx context.Context, doer, owner *user_model.User, p typeSpecificSize = setting.Packages.LimitSizeDebian case packages_model.TypeGeneric: typeSpecificSize = setting.Packages.LimitSizeGeneric + case packages_model.TypeGo: + typeSpecificSize = setting.Packages.LimitSizeGo case packages_model.TypeHelm: typeSpecificSize = setting.Packages.LimitSizeHelm case packages_model.TypeMaven: |