forked from quic-go/quic-go
simplify generation of mocks for internal types
This commit is contained in:
@@ -6,8 +6,9 @@ package handshake
|
||||
|
||||
import (
|
||||
tls "crypto/tls"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
)
|
||||
|
||||
// MockClientSessionCache is a mock of ClientSessionCache interface
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
package handshake
|
||||
|
||||
//go:generate sh -c "../mockgen_internal.sh handshake mock_handshake_runner_test.go github.com/lucas-clemente/quic-go/internal/handshake handshakeRunner"
|
||||
//go:generate sh -c "mockgen -package handshake crypto/tls ClientSessionCache > mock_client_session_cache_test.go"
|
||||
//go:generate sh -c "../../mockgen_private.sh handshake mock_handshake_runner_test.go github.com/lucas-clemente/quic-go/internal/handshake handshakeRunner"
|
||||
|
||||
// The following command produces a warning message on OSX, however, it still generates the correct mock file.
|
||||
// See https://github.com/golang/mock/issues/339 for details.
|
||||
//go:generate sh -c "mockgen -package handshake -destination mock_client_session_cache_test.go crypto/tls ClientSessionCache && goimports -w mock_client_session_cache_test.go"
|
||||
|
||||
Reference in New Issue
Block a user