Duration returns the duration representation of the flag given by name. It returns false if the flag is not a duration type. It panics if the flag is not in the flag set.
(name string)
| 345 | // is not a duration type. It panics if the flag is |
| 346 | // not in the flag set. |
| 347 | func (f Flags) Duration(name string) time.Duration { |
| 348 | val, _ := caddy.ParseDuration(f.String(name)) |
| 349 | return val |
| 350 | } |
| 351 | |
| 352 | func loadEnvFromFile(envFile string) error { |
| 353 | file, err := os.Open(envFile) |