lint corrections

This commit is contained in:
Danila Fominykh 2023-10-31 20:36:08 -03:00
parent 6652fbaee1
commit 5c22b915bb
No known key found for this signature in database
GPG Key ID: FC04D07F75B663FC
3 changed files with 8 additions and 7 deletions

View File

@ -19,6 +19,7 @@ import (
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/modules/validation"
"github.com/mholt/archiver/v3"
)

View File

@ -175,7 +175,7 @@ backup = usr/bin/paket1
}
func TestValidatePackageSpec(t *testing.T) {
var newpkg = func() Package {
newpkg := func() Package {
return Package{
Name: "abc",
Version: "1-1",

View File

@ -32,11 +32,11 @@ func TestPackageArch(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
var (
gitV1x86_64 = BuildArchPackage(t, "git", "1-1", "x86_64")
gitV1i686 = BuildArchPackage(t, "git", "1-1", "i686")
iconsV1any = BuildArchPackage(t, "icons", "1-1", "any")
gitV2x86_64 = BuildArchPackage(t, "git", "2-1", "x86_64")
iconsV2any = BuildArchPackage(t, "icons", "2-1", "any")
gitV1x86_64 = buildArchPackage(t, "git", "1-1", "x86_64")
gitV1i686 = buildArchPackage(t, "git", "1-1", "i686")
iconsV1any = buildArchPackage(t, "icons", "1-1", "any")
gitV2x86_64 = buildArchPackage(t, "git", "2-1", "x86_64")
iconsV2any = buildArchPackage(t, "icons", "2-1", "any")
firstSign = []byte{1, 2, 3, 4}
secondSign = []byte{4, 3, 2, 1}
@ -282,7 +282,7 @@ type testArchPackage struct {
pkg arch.Package
}
func BuildArchPackage(t *testing.T, name, ver, architecture string) testArchPackage {
func buildArchPackage(t *testing.T, name, ver, architecture string) testArchPackage {
fs := fstest.MapFS{
"pkginfo": &fstest.MapFile{
Data: []byte(fmt.Sprintf(