Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix gf run custom arguments and gf gen dao specify config file path #1879

Merged
merged 9 commits into from
Jul 4, 2022

Conversation

omegamt
Copy link
Contributor

@omegamt omegamt commented May 24, 2022

不知为何gf gen dao工具一直没有把指定配置路径选项完善一下, 不是很常用吗
https://goframe.org/pages/viewpage.action?pageId=3673173 的使用方式示例
gf gen dao -p ./model -c config.yaml -g user-center -t user,user_detail,user_login
-c 一直用不了, 短命令已被 DescriptionTag 占用了 short命令找不到合适的就用了cfg
以下测试没问题
gf gen dao -p ./src -cfg ./myconf/conf.toml

之前使用 gf run main.go --args "-www ./product debug true" 一直没法把参数传进去
经测试以下两运行方式接收到的参数一致
$ gf run main.go --args "-www ./product -debug true"
$ ./main -www ./product -debug true

@gqcn gqcn added the wip label Jun 16, 2022
cmd/gf/internal/cmd/cmd_gen_dao.go Outdated Show resolved Hide resolved
cmd/gf/internal/cmd/cmd_run.go Outdated Show resolved Hide resolved
cmd/gf/internal/cmd/cmd_run.go Outdated Show resolved Hide resolved
非常抱歉! 第一次提pr, 有些github流程问题平时没有机会遇到, 需要进一步操作麻烦提示一下下一步,谢了
@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2022

Codecov Report

Merging #1879 (7ed4cae) into master (19779cd) will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1879      +/-   ##
==========================================
+ Coverage   75.56%   75.57%   +0.01%     
==========================================
  Files         512      512              
  Lines       46373    46373              
==========================================
+ Hits        35041    35048       +7     
+ Misses       9328     9321       -7     
  Partials     2004     2004              
Flag Coverage Δ
go-1.15-386 75.50% <ø> (+0.01%) ⬆️
go-1.15-amd64 75.43% <ø> (-0.04%) ⬇️
go-1.16-386 75.48% <ø> (+<0.01%) ⬆️
go-1.16-amd64 75.47% <ø> (ø)
go-1.17-386 75.51% <ø> (+0.03%) ⬆️
go-1.17-amd64 75.49% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
os/gfsnotify/gfsnotify_filefunc.go 74.02% <0.00%> (-3.90%) ⬇️
os/gcron/gcron_schedule.go 67.52% <0.00%> (+0.42%) ⬆️
container/gmap/gmap_hash_str_str_map.go 97.99% <0.00%> (+1.00%) ⬆️
os/gfsnotify/gfsnotify_watcher_loop.go 83.19% <0.00%> (+2.52%) ⬆️
os/gfile/gfile_scan.go 85.55% <0.00%> (+3.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 19779cd...7ed4cae. Read the comment docs.

cmd/gf/internal/cmd/cmd_gen_dao.go Outdated Show resolved Hide resolved
@gqcn gqcn merged commit 40e6b2b into gogf:master Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants