ShowStats returns true if the user added a `--stats` flag to the command line. This is called by Run to override the default value of the showStats passed in.
()
| 232 | // This is called by Run to override the default value of the |
| 233 | // showStats passed in. |
| 234 | func ShowStats() bool { |
| 235 | statsIntervalFlag := pflag.Lookup("stats") |
| 236 | return statsIntervalFlag != nil && statsIntervalFlag.Changed |
| 237 | } |
| 238 | |
| 239 | // Run the function with stats and retries if required |
| 240 | func Run(Retry bool, showStats bool, cmd *cobra.Command, f func() error) { |
no test coverage detected
searching dependent graphs…