fusenapi/fs_gen_api.sh
laodaming 6d8bdcb2a6 fix
2023-06-26 18:32:28 +08:00

15 lines
391 B
Bash
Executable File

#! /bin/bash
name=${1%%\\*}
options=("backend" "product-template" "product-model")
for option in "${options[@]}"; do
if [ "$name" = "$option" ]; then
echo "不能在"$name"里使用"
exit
fi
done
echo $name
goctl api go -api server_api/$name.api -dir server/$name --home ./goctl_template/
# ctxName=server/$name/internal/svc/servicecontext.go
# gofmt -w $ctxName