$ gf gen ctrl -h
USAGE
gf gen ctrl [OPTION]
OPTION
-s, --srcFolder source folder path to be parsed. default: api
-d, --dstFolder destination folder path storing automatically generated go files. default: internal/controller
-w, --watchFile used in file watcher, it re-generates go files only if given file is under srcFolder
-k, --sdkPath also generate SDK go files for api definitions to specified directory
-v, --sdkStdVersion use standard version prefix for generated sdk request path
-n, --sdkNoV1 do not add version suffix for interface module name if version is v1
-h, --help more information about this command
EXAMPLE
gf gen ctrl
2 Comments
lshfong
手动怎么生成呢?用gf gen ctrl后,在api中没有生成新文件,
现在的方式太复杂了,维护的文件也太多,比JAVA还绕,除非有配套的强大开发工具,如JAVA的eclipse.exe,不然工作量太大了。还是1版本更经典得多
布客说
注意你的gf版本,该特性需要 v2.5+