Skip to content

Commit d6f7462

Browse files
committed
Make mktypes.sh generate code for v3
1 parent 7e5409b commit d6f7462

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

mktypes.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ GOOS=$(go env GOOS)
66
GOARCH=$(go env GOARCH)
77
GOARCH=$(go env GOARCH)
88

9-
for PKG in $PKGS
9+
for DIR in . v3
1010
do
11-
if [ -e "${PKG}/types_${GOOS}.go" ]; then
12-
(echo "// +build $GOOS"
13-
echo "// +build $GOARCH"
14-
go tool cgo -godefs "${PKG}/types_${GOOS}.go") | gofmt > "${PKG}/${PKG}_${GOOS}_${GOARCH}.go"
15-
fi
11+
(cd "$DIR" || exit
12+
for PKG in $PKGS
13+
do
14+
if [ -e "${PKG}/types_${GOOS}.go" ]; then
15+
(echo "// +build $GOOS"
16+
echo "// +build $GOARCH"
17+
go tool cgo -godefs "${PKG}/types_${GOOS}.go") | gofmt > "${PKG}/${PKG}_${GOOS}_${GOARCH}.go"
18+
fi
19+
done)
1620
done

0 commit comments

Comments
 (0)