Upgrade Go 1.22 and upgrade dependency (#29869)

This commit is contained in:
2024-03-17 23:40:05 +08:00
committed by GitHub
parent 099052aba5
commit abb330e613
8 changed files with 265 additions and 589 deletions

File diff suppressed because one or more lines are too long

153
go.mod

File diff suppressed because it is too large Load Diff

663
go.sum

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@ import (
pingv1 "code.gitea.io/actions-proto-go/ping/v1"
"code.gitea.io/actions-proto-go/ping/v1/pingv1connect"
"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
)
func NewPingServiceHandler() (string, http.Handler) {
@ -21,9 +21,7 @@ func NewPingServiceHandler() (string, http.Handler) {
var _ pingv1connect.PingServiceHandler = (*Service)(nil)
type Service struct {
pingv1connect.UnimplementedPingServiceHandler
}
type Service struct{}
func (s *Service) Ping(
ctx context.Context,

View File

@ -11,7 +11,7 @@ import (
pingv1 "code.gitea.io/actions-proto-go/ping/v1"
"code.gitea.io/actions-proto-go/ping/v1/pingv1connect"
"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

View File

@ -15,7 +15,7 @@ import (
"code.gitea.io/gitea/modules/timeutil"
"code.gitea.io/gitea/modules/util"
"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

View File

@ -16,7 +16,7 @@ import (
runnerv1 "code.gitea.io/actions-proto-go/runner/v1"
"code.gitea.io/actions-proto-go/runner/v1/runnerv1connect"
"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
gouuid "github.com/google/uuid"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
@ -32,9 +32,7 @@ func NewRunnerServiceHandler() (string, http.Handler) {
var _ runnerv1connect.RunnerServiceClient = (*Service)(nil)
type Service struct {
runnerv1connect.UnimplementedRunnerServiceHandler
}
type Service struct{}
// Register for new runner.
func (s *Service) Register(

View File

@ -259,7 +259,6 @@ func TestWebhookDeliverSpecificTypes(t *testing.T) {
for typ := range cases {
cases[typ].gotBody = make(chan []byte, 1)
typ := typ // TODO: remove this workaround when Go >= 1.22
t.Run(typ, func(t *testing.T) {
t.Parallel()
hook := &webhook_model.Webhook{