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

feat: add -w/--watchPaths for subcommand gf run #3009

Merged
merged 5 commits into from Oct 12, 2023

Conversation

windvalley
Copy link
Contributor

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 #2822

windvalley and others added 2 commits October 10, 2023 10:24
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
@codecov-commenter
Copy link

codecov-commenter commented Oct 10, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (3cd0059) 77.65% compared to head (a518f63) 77.62%.
Report is 6 commits behind head on master.

❗ Current head a518f63 differs from pull request most recent head 6613d9e. Consider uploading reports for the commit 6613d9e to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3009      +/-   ##
==========================================
- Coverage   77.65%   77.62%   -0.03%     
==========================================
  Files         647      647              
  Lines       54666    54666              
==========================================
- Hits        42449    42434      -15     
- Misses      10059    10066       +7     
- Partials     2158     2166       +8     
Flag Coverage Δ
go-1.18-386 ?
go-1.18-amd64 ?
go-1.19-386 ?
go-1.19-amd64 77.58% <ø> (-0.04%) ⬇️
go-1.20-386 ?
go-1.20-amd64 77.64% <ø> (+0.02%) ⬆️
go-1.21-amd64 ?

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

see 7 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

cmd/gf/internal/cmd/cmd_run.go Show resolved Hide resolved
cmd/gf/internal/cmd/cmd_run.go Show resolved Hide resolved
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
cmd/gf/internal/cmd/cmd_run.go Outdated Show resolved Hide resolved
cmd/gf/internal/cmd/cmd_run.go Show resolved Hide resolved
@gqcn gqcn merged commit 0e7d7d1 into gogf:master Oct 12, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Live rebuild when manifest/config/config.yaml changed
4 participants