From 79c95e116198388070fca85067b51c8491065bd7 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Tue, 26 Dec 2017 10:37:47 +0700 Subject: [PATCH] fix mockgen script which caused a probem with the vendored curve25519 curve25519 uses Go compiler directives (go:noescape), which apparently mockgen doesn't understand and therefore throws errors. --- mockgen_private.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mockgen_private.sh b/mockgen_private.sh index 5e07a031..7fbe68d5 100755 --- a/mockgen_private.sh +++ b/mockgen_private.sh @@ -8,7 +8,8 @@ TEMP_DIR=$(mktemp -d) mkdir -p $TEMP_DIR/src/github.com/lucas-clemente/quic-go/ # copy all .go files to a temporary directory -rsync -r --include='*.go' --include '*/' --exclude '*' $GOPATH/src/github.com/lucas-clemente/quic-go/ $TEMP_DIR/src/github.com/lucas-clemente/quic-go/ +# golang.org/x/crypto/curve25519/ uses Go compiler directives, which is confusing to mockgen +rsync -r --exclude 'vendor/golang.org/x/crypto/curve25519/' --include='*.go' --include '*/' --exclude '*' $GOPATH/src/github.com/lucas-clemente/quic-go/ $TEMP_DIR/src/github.com/lucas-clemente/quic-go/ echo "type $5 = $4" >> $TEMP_DIR/src/github.com/lucas-clemente/quic-go/interface.go export GOPATH="$TEMP_DIR:$GOPATH"