可以了
This commit is contained in:
parent
1a0156c686
commit
8fae3400d3
|
@ -1,5 +1,5 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
name=${1%\/}
|
name=${1%%\\*}
|
||||||
echo $name
|
echo $name
|
||||||
goctl api go -api server_api/$name.api -dir server/$name --home ./goctl_template/
|
goctl api go -api server_api/$name.api -dir server/$name --home ./goctl_template/
|
||||||
# ctxName=server/$name/internal/svc/servicecontext.go
|
# ctxName=server/$name/internal/svc/servicecontext.go
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
# 专为后台序列化
|
name=${1%%\\*}
|
||||||
name=${1%\/}
|
options=("backend" "backend1" "backend2")
|
||||||
echo $name
|
for option in "${options[@]}"; do
|
||||||
goctl api go -api server_api/$name.api -dir server/$name --home ./goctl_template_backend/
|
if [ "$name" = "$option" ]; then
|
||||||
# ctxName=server/$name/internal/svc/servicecontext.go
|
echo $name
|
||||||
# gofmt -w $ctxName
|
goctl api go -api server_api/$name.api -dir server/$name --home ./goctl_template_backend/
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for option in "${options[@]}"; do
|
||||||
|
echo "只支持 $option"
|
||||||
|
done
|
|
@ -1,4 +1,4 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
# goctl model mysql ddl --src ./ddl/$1.sql --dir model/ --home ./goctl_template
|
# goctl model mysql ddl --src ./ddl/$1.sql --dir model/ --home ./goctl_template
|
||||||
|
name=${1%%\\*}
|
||||||
go run generator/main.go -name $1
|
go run generator/main.go -name $name
|
Loading…
Reference in New Issue
Block a user