MCPcopy
hub / github.com/gofiber/fiber / Len

Method Len

state.go:89–97  ·  view source on GitHub ↗

Len returns the number of keys in the State.

()

Source from the content-addressed store, hash-verified

87
88// Len returns the number of keys in the State.
89func (s *State) Len() int {
90 length := 0
91 s.dependencies.Range(func(_, _ any) bool {
92 length++
93 return true
94 })
95
96 return length
97}
98
99// GetState retrieves a value from the State and casts it to the desired type.
100// It returns the casted value and a boolean indicating if the cast was successful.

Callers

nothing calls this directly

Calls 1

RangeMethod · 0.65

Tested by

no test coverage detected