MCPcopy Create free account
hub / github.com/kataras/iris / Length

Method Length

x/errors/validation/slice.go:25–28  ·  view source on GitHub ↗

Length adds an error if the slice length is not in the given range.

(min, max int)

Source from the content-addressed store, hash-verified

23
24// Length adds an error if the slice length is not in the given range.
25func (e *SliceError[T, V]) Length(min, max int) *SliceError[T, V] {
26 e.Func(SliceLength[T, V](min, max))
27 return e
28}
29
30// NotEmptySlice accepts any slice and returns a message if the value is empty.
31func NotEmptySlice[T any, V SliceType[T]](s V) string {

Callers 2

TestRoutingFunction · 0.45
HandleRequestMethod · 0.45

Calls 2

SliceLengthFunction · 0.85
FuncMethod · 0.80

Tested by 1

TestRoutingFunction · 0.36