-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Live rebuild when manifest/config/config.yaml
changed
#2822
Labels
Comments
@windvalley 可以给 |
Hello @windvalley. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it! |
windvalley
added a commit
to windvalley/gf
that referenced
this issue
Oct 10, 2023
Live reload supports files specified using the "-w" parameter in addition to Go files. Usage Example: 1) Watch one file $ gf run main.go -w manifest/config/config.yaml 2) Watch multiple files, seprated by commas $ gf run main.go -w manifest/config/config.yaml,otherpath/otherfile Fixes gogf#2822
windvalley
added a commit
to windvalley/gf
that referenced
this issue
Oct 10, 2023
Live reload supports files specified using the "-w/--watchPaths" parameter in addition to Go files. Help message for `gf run -w`: ```text -w, --watchPaths watch additional paths for live reload, separated by ",". i.e. "manifest/config/*.yaml" ``` Usage Example: 1) Watch one file $ gf run main.go -w manifest/config/config.yaml 2) Watch multiple files, seprated by commas $ gf run main.go -w manifest/config/config.yaml,otherpath/otherfile 3) Watch wildcard file $ gf run main.go -w "manifest/config/*.yaml" Fixes gogf#2822
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1. What version of
Go
and system type/arch are you using?go version go1.20.4 darwin/amd64
2. What version of
GoFrame
are you using?GoFrame CLI Tool v2.5.1, https://goframe.org
GoFrame Version: v2.5.1 in current go.mod
3. Can this issue be re-produced with the latest release?
yes
4. What did you do?
然后修改
manifest/config/config.yaml
文件.5. What did you expect to see?
希望
gf run main.go
能自动rebuild6. What did you see instead?
gf run main.go
没有自动rebuild.看源码, 目前只是针对go文件的变动才会自动rebuild, 不过在实际开发中, 开发环境配置文件可能会是要频繁变动的, 这样每次都需要重新运行
gf run main.go
, 比较麻烦, 是否考虑增加配置文件变动的场景也能自动rebuild的功能. 如果可以的话, 我提个pr, 感谢~ps: 后续又测了一下, 配置文件有热更新功能, 不过貌似仅对自定义的配置生效, 对框架原生相关的配置项调整没有效果, 所以考虑到
gf run main.go
仅是在开发环境使用, 加一个配置文件变化自动rebuild的特性, 应该可以接受.The text was updated successfully, but these errors were encountered: