M. Efe Çetin 937713e41e
feature: bind support for render (#1754)
* Bind support for Render.

* update

* fix tests

* split Pass-locals-to-views & Bind from Render

* update comments.

* add benchs.

* Update ctx.go

Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>

* Update ctx.go

* optimize

* switch dictpool.

*  feature: bind support for render
- improve performance

*  feature: bind support for render
- improve performance

Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>
Co-authored-by: wernerr <rene.werner@verivox.com>
Co-authored-by: wernerr <rene@gofiber.io>
2022-02-12 22:52:24 +01:00

26 lines
545 B
Go

package dictpool
//go:generate msgp
// KV struct so it storages key/value data.
type KV struct {
Key string
Value interface{}
}
// Dict dictionary as slice with better performance.
type Dict struct {
// D slice of KV for storage the data
D []KV
// Use binary search to the get an item.
// It's only useful on big heaps.
//
// WARNING: Increase searching performance on big heaps,
// but whe set new items could be slowier due to the sorting.
BinarySearch bool
}
// DictMap dictionary as map.
type DictMap map[string]interface{}