mirror of
https://github.com/go-ini/ini.git
synced 2026-06-19 21:46:45 +02:00
section: preallocate the size of keys hash (#297)
This commit is contained in:
+1
-1
@@ -217,7 +217,7 @@ func (s *Section) KeysHash() map[string]string {
|
||||
defer s.f.lock.RUnlock()
|
||||
}
|
||||
|
||||
hash := map[string]string{}
|
||||
hash := make(map[string]string, len(s.keysHash))
|
||||
for key, value := range s.keysHash {
|
||||
hash[key] = value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user