Update to go 1.26.0 and golangci-lint 2.9.0 (#36588)
This commit is contained in:
@@ -17,7 +17,6 @@ import (
|
||||
"code.gitea.io/gitea/modules/gitrepo"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
api "code.gitea.io/gitea/modules/structs"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
"code.gitea.io/gitea/services/contexttest"
|
||||
files_service "code.gitea.io/gitea/services/repository/files"
|
||||
|
||||
@@ -107,9 +106,9 @@ func getExpectedFileResponseForRepoFilesCreate(commitID string, lastCommit *git.
|
||||
Name: path.Base(treePath),
|
||||
Path: treePath,
|
||||
SHA: "103ff9234cefeee5ec5361d22b49fbb04d385885",
|
||||
LastCommitSHA: util.ToPointer(lastCommit.ID.String()),
|
||||
LastCommitterDate: util.ToPointer(lastCommit.Committer.When),
|
||||
LastAuthorDate: util.ToPointer(lastCommit.Author.When),
|
||||
LastCommitSHA: new(lastCommit.ID.String()),
|
||||
LastCommitterDate: new(lastCommit.Committer.When),
|
||||
LastAuthorDate: new(lastCommit.Author.When),
|
||||
Type: "file",
|
||||
Size: 18,
|
||||
Encoding: &encoding,
|
||||
@@ -177,9 +176,9 @@ func getExpectedFileResponseForRepoFilesUpdate(commitID, filename, lastCommitSHA
|
||||
Name: filename,
|
||||
Path: filename,
|
||||
SHA: "dbf8d00e022e05b7e5cf7e535de857de57925647",
|
||||
LastCommitSHA: util.ToPointer(lastCommitSHA),
|
||||
LastCommitterDate: util.ToPointer(lastCommitterWhen),
|
||||
LastAuthorDate: util.ToPointer(lastAuthorWhen),
|
||||
LastCommitSHA: new(lastCommitSHA),
|
||||
LastCommitterDate: new(lastCommitterWhen),
|
||||
LastAuthorDate: new(lastAuthorWhen),
|
||||
Type: "file",
|
||||
Size: 43,
|
||||
Encoding: &encoding,
|
||||
@@ -253,8 +252,8 @@ func getExpectedFileResponseForRepoFilesUpdateRename(commitID, lastCommitSHA str
|
||||
sha: "d4a41a0d4db4949e129bd22f871171ea988103ef",
|
||||
size: 129,
|
||||
content: "dmVyc2lvbiBodHRwczovL2dpdC1sZnMuZ2l0aHViLmNvbS9zcGVjL3YxCm9pZCBzaGEyNTY6MmVjY2RiNDM4MjVkMmE0OWQ5OWQ1NDJkYWEyMDA3NWNmZjFkOTdkOWQyMzQ5YTg5NzdlZmU5YzAzNjYxNzM3YwpzaXplIDIwNDgK",
|
||||
lfsOid: util.ToPointer("2eccdb43825d2a49d99d542daa20075cff1d97d9d2349a8977efe9c03661737c"),
|
||||
lfsSize: util.ToPointer(int64(2048)),
|
||||
lfsOid: new("2eccdb43825d2a49d99d542daa20075cff1d97d9d2349a8977efe9c03661737c"),
|
||||
lfsSize: new(int64(2048)),
|
||||
},
|
||||
{
|
||||
filename: "jpeg.jpeg",
|
||||
@@ -267,8 +266,8 @@ func getExpectedFileResponseForRepoFilesUpdateRename(commitID, lastCommitSHA str
|
||||
sha: "2b6c6c4eaefa24b22f2092c3d54b263ff26feb58",
|
||||
size: 127,
|
||||
content: "dmVyc2lvbiBodHRwczovL2dpdC1sZnMuZ2l0aHViLmNvbS9zcGVjL3YxCm9pZCBzaGEyNTY6N2I2YjJjODhkYmE5Zjc2MGExYTU4NDY5YjY3ZmVlMmI2OThlZjdlOTM5OWM0Y2E0ZjM0YTE0Y2NiZTM5ZjYyMwpzaXplIDI3Cg==",
|
||||
lfsOid: util.ToPointer("7b6b2c88dba9f760a1a58469b67fee2b698ef7e9399c4ca4f34a14ccbe39f623"),
|
||||
lfsSize: util.ToPointer(int64(27)),
|
||||
lfsOid: new("7b6b2c88dba9f760a1a58469b67fee2b698ef7e9399c4ca4f34a14ccbe39f623"),
|
||||
lfsSize: new(int64(27)),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -283,10 +282,10 @@ func getExpectedFileResponseForRepoFilesUpdateRename(commitID, lastCommitSHA str
|
||||
Name: detail.filename,
|
||||
Path: detail.filename,
|
||||
SHA: detail.sha,
|
||||
LastCommitSHA: util.ToPointer(lastCommitSHA),
|
||||
LastCommitSHA: new(lastCommitSHA),
|
||||
Type: "file",
|
||||
Size: detail.size,
|
||||
Encoding: util.ToPointer("base64"),
|
||||
Encoding: new("base64"),
|
||||
Content: &detail.content,
|
||||
URL: &selfURL,
|
||||
HTMLURL: &htmlURL,
|
||||
|
||||
Reference in New Issue
Block a user