github.com/datastax/go-cassandra-native-protocol@v0.0.0-20220706104457-5e8aad05cf90/datacodec/mocks.md (about) 1 ### Generating mocks 2 3 Mock objects are generated with [Mockery](https://github.com/vektra/mockery). 4 5 To install Mockery on macOS: 6 7 brew install mockery 8 9 For more installation options, see [installation](https://github.com/vektra/mockery#installation). Note that using `go 10 install` is not officially supported by Mockery. 11 12 To re-generate the mocks, run the following commands: 13 14 mockery --dir=./datacodec --name=Codec --output=./datacodec --outpkg=datacodec --filename=mock_codec_test.go --structname=mockCodec 15 mockery --dir=./datacodec --name=extractor --output=./datacodec --outpkg=datacodec --filename=mock_extractor_test.go --structname=mockExtractor 16 mockery --dir=./datacodec --name=injector --output=./datacodec --outpkg=datacodec --filename=mock_injector_test.go --structname=mockInjector 17 mockery --dir=./datacodec --name=keyValueExtractor --output=./datacodec --outpkg=datacodec --filename=mock_key_value_extractor_test.go --structname=mockKeyValueExtractor 18 mockery --dir=./datacodec --name=keyValueInjector --output=./datacodec --outpkg=datacodec --filename=mock_key_value_injector_test.go --structname=mockKeyValueInjector 19 20 The Makefile has a `mocks` target that will regenerate all mock objects.