switch from unmaintained golang/mock to go.uber.org/mock (#4050)

This commit is contained in:
Marten Seemann 2023-08-28 16:23:55 +07:00 committed by GitHub
parent 8f34488c76
commit 2797f85fc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
87 changed files with 130 additions and 167 deletions

View file

@ -3,10 +3,9 @@ package logging
import (
"testing"
"github.com/golang/mock/gomock"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"go.uber.org/mock/gomock"
)
func TestLogging(t *testing.T) {

View file

@ -9,10 +9,10 @@ import (
reflect "reflect"
time "time"
gomock "github.com/golang/mock/gomock"
protocol "github.com/quic-go/quic-go/internal/protocol"
utils "github.com/quic-go/quic-go/internal/utils"
wire "github.com/quic-go/quic-go/internal/wire"
gomock "go.uber.org/mock/gomock"
)
// MockConnectionTracer is a mock of ConnectionTracer interface.

View file

@ -8,9 +8,9 @@ import (
net "net"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
protocol "github.com/quic-go/quic-go/internal/protocol"
wire "github.com/quic-go/quic-go/internal/wire"
gomock "go.uber.org/mock/gomock"
)
// MockTracer is a mock of Tracer interface.

View file

@ -1,4 +1,4 @@
package logging
//go:generate sh -c "go run github.com/golang/mock/mockgen -package logging -self_package github.com/quic-go/quic-go/logging -destination mock_connection_tracer_test.go github.com/quic-go/quic-go/logging ConnectionTracer"
//go:generate sh -c "go run github.com/golang/mock/mockgen -package logging -self_package github.com/quic-go/quic-go/logging -destination mock_tracer_test.go github.com/quic-go/quic-go/logging Tracer"
//go:generate sh -c "go run go.uber.org/mock/mockgen -package logging -self_package github.com/quic-go/quic-go/logging -destination mock_connection_tracer_test.go github.com/quic-go/quic-go/logging ConnectionTracer"
//go:generate sh -c "go run go.uber.org/mock/mockgen -package logging -self_package github.com/quic-go/quic-go/logging -destination mock_tracer_test.go github.com/quic-go/quic-go/logging Tracer"