Skip to content

Commit 1402c2f

Browse files
authored
Update README.md
1 parent 0aa5a34 commit 1402c2f

File tree

1 file changed

+62
-2
lines changed

1 file changed

+62
-2
lines changed

README.md

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,63 @@
1-
# ⚠️ Deprecated repository
1+
# Utils
22

3-
This middleware is no longer maintained, it is available within [Fiber v2](https://github.com/gofiber/fiber/tree/master/utils).
3+
[![Release](https://img.shields.io/github/release/gofiber/utils.svg)](https://github.com/gofiber/fiber/releases)
4+
[![Discord](https://img.shields.io/discord/704680098577514527?label=Discord&logo=discord&logoColor=white&color=7289DA)](https://gofiber.io/discord)
5+
[![Test](https://github.com/gofiber/utils/workflows/Test/badge.svg)](https://github.com/gofiber/utils/actions?query=workflow%3ATest)
6+
[![Security](https://github.com/gofiber/utils/workflows/Security/badge.svg)](https://github.com/gofiber/utils/actions?query=workflow%3ASecurity)
7+
[![Linter](https://github.com/gofiber/utils/workflows/Linter/badge.svg)](https://github.com/gofiber/utils/actions?query=workflow%3ALinter)
8+
9+
A collection of common functions but with better performance, less allocations and no dependencies created for [Fiber](https://github.com/gofiber/fiber).
10+
11+
```go
12+
// go test -v -benchmem -run=^$ -bench=Benchmark_ -count=2
13+
14+
Benchmark_GetMIME/fiber 14287550 84.2 ns/op 0 B/op 0 allocs/op
15+
Benchmark_GetMIME/fiber 14819698 78.3 ns/op 0 B/op 0 allocs/op
16+
Benchmark_GetMIME/default 6459128 184 ns/op 0 B/op 0 allocs/op
17+
Benchmark_GetMIME/default 6385042 184 ns/op 0 B/op 0 allocs/op
18+
19+
Benchmark_UUID/fiber 17652744 59.1 ns/op 48 B/op 1 allocs/op
20+
Benchmark_UUID/fiber 19361145 58.5 ns/op 48 B/op 1 allocs/op
21+
Benchmark_UUID/default 4271024 281 ns/op 64 B/op 2 allocs/op
22+
Benchmark_UUID/default 4435306 278 ns/op 64 B/op 2 allocs/op
23+
24+
Benchmark_ToLower/fiber 22987184 48.2 ns/op 48 B/op 1 allocs/op
25+
Benchmark_ToLower/fiber 24491794 49.6 ns/op 48 B/op 1 allocs/op
26+
Benchmark_ToLower/default 9232608 123 ns/op 48 B/op 1 allocs/op
27+
Benchmark_ToLower/default 9454870 123 ns/op 48 B/op 1 allocs/op
28+
29+
Benchmark_ToLowerBytes/fiber 44463876 26.1 ns/op 0 B/op 0 allocs/op
30+
Benchmark_ToLowerBytes/fiber 39997200 26.1 ns/op 0 B/op 0 allocs/op
31+
Benchmark_ToLowerBytes/default 14879088 77.6 ns/op 48 B/op 1 allocs/op
32+
Benchmark_ToLowerBytes/default 14631433 79.2 ns/op 48 B/op 1 allocs/op
33+
34+
Benchmark_ToUpper/fiber 22648730 49.4 ns/op 48 B/op 1 allocs/op
35+
Benchmark_ToUpper/fiber 23084425 48.6 ns/op 48 B/op 1 allocs/op
36+
Benchmark_ToUpper/default 9520122 124 ns/op 48 B/op 1 allocs/op
37+
Benchmark_ToUpper/default 9375014 133 ns/op 48 B/op 1 allocs/op
38+
39+
Benchmark_ToUpperBytes/fiber 44439176 25.6 ns/op 0 B/op 0 allocs/op
40+
Benchmark_ToUpperBytes/fiber 44458934 25.5 ns/op 0 B/op 0 allocs/op
41+
Benchmark_ToUpperBytes/default 15347073 74.1 ns/op 48 B/op 1 allocs/op
42+
Benchmark_ToUpperBytes/default 15511370 74.2 ns/op 48 B/op 1 allocs/op
43+
44+
Benchmark_EqualFolds/fiber 34297864 33.8 ns/op 0 B/op 0 allocs/op
45+
Benchmark_EqualFolds/fiber 34285322 34.0 ns/op 0 B/op 0 allocs/op
46+
Benchmark_EqualFolds/default 12756945 91.8 ns/op 0 B/op 0 allocs/op
47+
Benchmark_EqualFolds/default 13015282 91.1 ns/op 0 B/op 0 allocs/op
48+
49+
Benchmark_Trim/fiber 207314002 5.85 ns/op 0 B/op 0 allocs/op
50+
Benchmark_Trim/fiber 207386125 5.78 ns/op 0 B/op 0 allocs/op
51+
Benchmark_Trim/default 16506302 68.5 ns/op 32 B/op 1 allocs/op
52+
Benchmark_Trim/default 16669119 68.9 ns/op 32 B/op 1 allocs/op
53+
54+
Benchmark_TrimLeft/fiber 343254828 3.47 ns/op 0 B/op 0 allocs/op
55+
Benchmark_TrimLeft/fiber 344407171 3.45 ns/op 0 B/op 0 allocs/op
56+
Benchmark_TrimLeft/default 24999790 46.4 ns/op 32 B/op 1 allocs/op
57+
Benchmark_TrimLeft/default 25001926 45.3 ns/op 32 B/op 1 allocs/op
58+
59+
Benchmark_TrimRight/fiber 374543056 3.15 ns/op 0 B/op 0 allocs/op
60+
Benchmark_TrimRight/fiber 336067616 3.15 ns/op 0 B/op 0 allocs/op
61+
Benchmark_TrimRight/default 20868186 52.8 ns/op 32 B/op 1 allocs/op
62+
Benchmark_TrimRight/default 21434695 55.1 ns/op 32 B/op 1 allocs/op
63+
```

0 commit comments

Comments
 (0)