MCPcopy Index your code
hub / github.com/labstack/echo / MustDuration

Method MustDuration

binder.go:1184–1186  ·  view source on GitHub ↗

MustDuration requires parameter value to exist to bind to time.Duration variable. Returns error when value does not exist

(sourceParam string, dest *time.Duration)

Source from the content-addressed store, hash-verified

1182
1183// MustDuration requires parameter value to exist to bind to time.Duration variable. Returns error when value does not exist
1184func (b *ValueBinder) MustDuration(sourceParam string, dest *time.Duration) *ValueBinder {
1185 return b.duration(sourceParam, dest, true)
1186}
1187
1188func (b *ValueBinder) duration(sourceParam string, dest *time.Duration, valueMustExist bool) *ValueBinder {
1189 if b.failFast && b.errors != nil {

Callers 2

TestValueBinder_DurationFunction · 0.80

Calls 1

durationMethod · 0.95

Tested by 2

TestValueBinder_DurationFunction · 0.64