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