Make mktypes.sh generate code for v3
This commit is contained in:
parent
7e5409b131
commit
d6f7462429
16
mktypes.sh
16
mktypes.sh
|
@ -6,11 +6,15 @@ GOOS=$(go env GOOS)
|
|||
GOARCH=$(go env GOARCH)
|
||||
GOARCH=$(go env GOARCH)
|
||||
|
||||
for PKG in $PKGS
|
||||
for DIR in . v3
|
||||
do
|
||||
if [ -e "${PKG}/types_${GOOS}.go" ]; then
|
||||
(echo "// +build $GOOS"
|
||||
echo "// +build $GOARCH"
|
||||
go tool cgo -godefs "${PKG}/types_${GOOS}.go") | gofmt > "${PKG}/${PKG}_${GOOS}_${GOARCH}.go"
|
||||
fi
|
||||
(cd "$DIR" || exit
|
||||
for PKG in $PKGS
|
||||
do
|
||||
if [ -e "${PKG}/types_${GOOS}.go" ]; then
|
||||
(echo "// +build $GOOS"
|
||||
echo "// +build $GOARCH"
|
||||
go tool cgo -godefs "${PKG}/types_${GOOS}.go") | gofmt > "${PKG}/${PKG}_${GOOS}_${GOARCH}.go"
|
||||
fi
|
||||
done)
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue