Mikaelemmmm / go-zero-looklook

🔥基于go-zero(go zero) 微服务全技术栈开发最佳实践项目。Develop best practice projects based on the full technology stack of go zero (go zero) microservices.
https://go-zero.dev
MIT License
4.42k stars 824 forks source link

windows 运行 goctl api go -api *.api -dir ../ --style goZero 出错 #76

Closed fivenull closed 2 years ago

fivenull commented 2 years ago

api目录下user.api已经定义好了,运行

goctl api go -api *.api -dir ../  --style goZero  

出错,错误提示为

Error: open *.api: The filename, directory name, or volume label syntax is incorrect.
Usage:
  goctl api go [flags]

Flags:
      --api string      The api file
      --branch string   The branch of the remote repo, it does work with --remote
      --dir string      The target dir
  -h, --help            help for go
      --home string     The goctl home path of the template, --home and --remote cannot be set at the same time, if they are, --remote has higher priority
      --remote string   The remote git repo of the template, --home and --remote cannot be set at the same time, if they are, --remote has higher priority
                        The git repo directory must be consistent with the https://github.com/zeromicro/go-zero-template directory structure
      --style string    The file naming format, see [https://github.com/zeromicro/go-zero/blob/master/tools/goctl/config/readme.md] (default "gozero")

open *.api: The filename, directory name, or volume label syntax is incorrect.

指定生成文件就成功,命令如下:

goctl api go -api user.api -dir ../  --style goZero
fivenull commented 2 years ago

运行

goctl rpc protoc *.proto --go_out=../ --go-grpc_out=../  --zrpc_out=../ --style=goZero

也会产生同样的问题,指定对应的proto文件就可以使用,都是在windows 10 环境下

Mikaelemmmm commented 2 years ago

windows下不支持 *

fivenull commented 2 years ago

windows下不支持 *

好的

XR-stb commented 1 year ago

windows下不支持 *

但是指定单个文件也会这样是为什么

XR-stb commented 1 year ago

windows下不支持 *

但是指定单个文件也会这样是为什么

我已经知道答案了:我的user.api文件内容是空的!!! 我直接下载的文件,以为里面有内容呢