feat: Replace mongo package with monc & mon (#2002)

* Replace mongo package with monc & mon

* Add terminal whitespace

* format code
This commit is contained in:
anqiansong
2022-06-12 23:02:34 +08:00
committed by GitHub
parent ed1c937998
commit c27e00b45c
16 changed files with 544 additions and 255 deletions

View File

@@ -0,0 +1,32 @@
#!/bin/bash
wd=$(dirname $0)
project=test
testDir=$wd/$project
mkdir -p $testDir
cd $testDir
# go mod init
go mod init $project
# generate cache code
goctl model mongo -t User -c --dir cache
if [ $? -ne 0 ]; then
exit 1
fi
# generate non-cache code
goctl model mongo -t User --dir nocache
if [ $? -ne 0 ]; then
exit 1
fi
# go mod tidy
GOPROXY=https://goproxy.cn && go mod tidy
# code inspection
go test -race ./...
if [ $? -ne 0 ]; then
echo
fi