blob: 9bd2a3ca7d9fbf856fb2c6d13342eb7519eb0936 [file] [log] [blame]
#!/bin/sh
set -e
export GOPATH=$(mktemp -d -t gopath-XXXXXXXXXX)
go install -mod=mod github.com/golang/mock/mockgen
`go env GOPATH`/bin/mockgen -build_flags "-mod=mod" -destination=src/common/mock_handler.go -package=common github.com/apache/thrift/test/go/src/gen/thrifttest ThriftTest
chmod a+w -R $GOPATH && rm -Rf $GOPATH