mirror of
https://github.com/xinliangnote/go-gin-api.git
synced 2024-04-21 12:31:46 +00:00
46 lines
603 B
Batchfile
46 lines
603 B
Batchfile
@echo off
|
|
chcp 65001
|
|
echo.
|
|
echo Regenerating file
|
|
echo.
|
|
go run -v ./cmd/mysqlmd/main.go -addr %1 -user %2 -pass %3 -name %4 -tables %5
|
|
if %errorlevel% == 1 (
|
|
echo.
|
|
echo failed!!!
|
|
exit 1
|
|
)
|
|
echo.
|
|
echo create curd code :
|
|
echo.
|
|
go build -o gormgen ./cmd/gormgen/main.go
|
|
if %errorlevel% == 1 (
|
|
echo.
|
|
echo failed!!!
|
|
exit 1
|
|
)
|
|
|
|
move gormgen $GOPATH/bin
|
|
if %errorlevel% == 1 (
|
|
echo.
|
|
echo failed!!!
|
|
exit 1
|
|
)
|
|
|
|
go generate ./...
|
|
if %errorlevel% == 1 (
|
|
echo.
|
|
echo failed!!!
|
|
exit 1
|
|
)
|
|
echo.
|
|
echo Formatting code
|
|
echo.
|
|
go run -v ./cmd/mfmt/main.go
|
|
if %errorlevel% == 1 (
|
|
echo.
|
|
echo failed!!!
|
|
exit 1
|
|
)
|
|
echo.
|
|
echo Done.
|