mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-12 16:52:29 +08:00
Pre-allocate memory to reduce the number of allocations (#272)
This commit is contained in:
@@ -71,7 +71,7 @@ func ConvertMapToQueryString(param map[string]any) string {
|
||||
if param == nil {
|
||||
return ""
|
||||
}
|
||||
var keys []string
|
||||
keys := make([]string, 0, len(param))
|
||||
for key := range param {
|
||||
keys = append(keys, key)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user