Skip to content

Commit

Permalink
CLI: Update default polling interval & docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Cian911 committed Jan 10, 2022
1 parent 9703ddc commit b370025
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Flags:
-e, --ext string File type you want to watch for.
-h, --help help for watch
-p, --path string Path you want to watch.
--poll int Specify a polling time in seconds. (default 3)
--poll int Specify a polling time in seconds. (default 5)
```
To get started quickly, you can run the following command, passing in the path, destination, and file extenstion you want to watch for. See the example below.
Expand Down
2 changes: 1 addition & 1 deletion cli/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func initCmd(runCmd cobra.Command) {
runCmd.PersistentFlags().StringP("path", "p", "", "Path you want to watch.")
runCmd.PersistentFlags().StringP("destination", "d", "", "Path you want files to be relocated.")
runCmd.PersistentFlags().StringP("ext", "e", "", "File type you want to watch for.")
runCmd.PersistentFlags().IntP("poll", "", 3, "Specify a polling time in seconds.")
runCmd.PersistentFlags().IntP("poll", "", 5, "Specify a polling time in seconds.")
runCmd.PersistentFlags().StringVar(&configFile, "config", "", "Pass an optional config file containing multiple paths to watch.")

viper.BindPFlag("path", runCmd.PersistentFlags().Lookup("path"))
Expand Down

0 comments on commit b370025

Please sign in to comment.