simplify mockgen usage for private interfaces (#3769)

This commit is contained in:
Marten Seemann
2023-04-19 16:57:00 +02:00
committed by GitHub
parent 379e7ec848
commit c9a2f79b1c
35 changed files with 325 additions and 310 deletions

View File

@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: roundtrip.go
// Source: github.com/quic-go/quic-go/http3 (interfaces: RoundTripCloser)
// Package http3 is a generated GoMock package.
package http3

6
http3/mockgen.go Normal file
View File

@@ -0,0 +1,6 @@
//go:build gomock || generate
package http3
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package http3 -destination mock_roundtripcloser_test.go github.com/quic-go/quic-go/http3 RoundTripCloser"
type RoundTripCloser = roundTripCloser

View File

@@ -19,8 +19,6 @@ import (
. "github.com/onsi/gomega"
)
//go:generate sh -c "./../mockgen_private.sh http3 mock_roundtripcloser_test.go github.com/quic-go/quic-go/http3 roundTripCloser"
type mockBody struct {
reader bytes.Reader
readErr error