add command fix and up (#2280)

This commit is contained in:
John Guo
2022-11-10 19:56:12 +08:00
committed by GitHub
parent 2e8d8f63ff
commit 8c71d579b5
14 changed files with 382 additions and 249 deletions

View File

@ -29,6 +29,14 @@ for file in `find . -name go.mod`; do
fi
fi
# package cmd/gf needs golang >= v1.18
if [ "gf" = $(basename $dirpath) ]; then
if ! go version|grep -q "1.18"; then
echo "ignore example as go version: $(go version)"
continue 1
fi
fi
cd $dirpath
go mod tidy
go build ./...