mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-01 14:56:30 +00:00
lint corrections
This commit is contained in:
parent
6652fbaee1
commit
5c22b915bb
@ -19,6 +19,7 @@ import (
|
|||||||
|
|
||||||
"code.gitea.io/gitea/modules/util"
|
"code.gitea.io/gitea/modules/util"
|
||||||
"code.gitea.io/gitea/modules/validation"
|
"code.gitea.io/gitea/modules/validation"
|
||||||
|
|
||||||
"github.com/mholt/archiver/v3"
|
"github.com/mholt/archiver/v3"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ backup = usr/bin/paket1
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestValidatePackageSpec(t *testing.T) {
|
func TestValidatePackageSpec(t *testing.T) {
|
||||||
var newpkg = func() Package {
|
newpkg := func() Package {
|
||||||
return Package{
|
return Package{
|
||||||
Name: "abc",
|
Name: "abc",
|
||||||
Version: "1-1",
|
Version: "1-1",
|
||||||
|
@ -32,11 +32,11 @@ func TestPackageArch(t *testing.T) {
|
|||||||
assert.NoError(t, unittest.PrepareTestDatabase())
|
assert.NoError(t, unittest.PrepareTestDatabase())
|
||||||
|
|
||||||
var (
|
var (
|
||||||
gitV1x86_64 = BuildArchPackage(t, "git", "1-1", "x86_64")
|
gitV1x86_64 = buildArchPackage(t, "git", "1-1", "x86_64")
|
||||||
gitV1i686 = BuildArchPackage(t, "git", "1-1", "i686")
|
gitV1i686 = buildArchPackage(t, "git", "1-1", "i686")
|
||||||
iconsV1any = BuildArchPackage(t, "icons", "1-1", "any")
|
iconsV1any = buildArchPackage(t, "icons", "1-1", "any")
|
||||||
gitV2x86_64 = BuildArchPackage(t, "git", "2-1", "x86_64")
|
gitV2x86_64 = buildArchPackage(t, "git", "2-1", "x86_64")
|
||||||
iconsV2any = BuildArchPackage(t, "icons", "2-1", "any")
|
iconsV2any = buildArchPackage(t, "icons", "2-1", "any")
|
||||||
|
|
||||||
firstSign = []byte{1, 2, 3, 4}
|
firstSign = []byte{1, 2, 3, 4}
|
||||||
secondSign = []byte{4, 3, 2, 1}
|
secondSign = []byte{4, 3, 2, 1}
|
||||||
@ -282,7 +282,7 @@ type testArchPackage struct {
|
|||||||
pkg arch.Package
|
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{
|
fs := fstest.MapFS{
|
||||||
"pkginfo": &fstest.MapFile{
|
"pkginfo": &fstest.MapFile{
|
||||||
Data: []byte(fmt.Sprintf(
|
Data: []byte(fmt.Sprintf(
|
||||||
|
Loading…
Reference in New Issue
Block a user