MCPcopy
hub / github.com/caddyserver/caddy / Duration

Method Duration

cmd/main.go:347–350  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 15

TestParseDurationFunction · 0.80
finishSettingUpFunction · 0.80
maintenanceForCAMethod · 0.80
renewCertsForCAMethod · 0.80
needsRenewalMethod · 0.80
ProvisionMethod · 0.80
genIntermediateMethod · 0.80
ProvisionMethod · 0.80
parseACMEServerFunction · 0.80
unmarshalCaddyfileMethod · 0.80
ProvisionMethod · 0.80
UnmarshalCaddyfileMethod · 0.80

Calls 1

StringMethod · 0.95

Tested by 6

TestParseDurationFunction · 0.64
newPassiveHandlerFunction · 0.64
TestMergeACMEIssuersFunction · 0.64