blob: bc39d6b719f34c0e0f61ecb5db382d82341851a9 [file] [log] [blame]
khenaidooffe076b2019-01-15 16:08:08 -05001// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2// Use of this source code is governed by a MIT license found in the LICENSE file.
3
4// +build go1.9
5
6package codec
7
8import "reflect"
9
10func makeMapReflect(t reflect.Type, size int) reflect.Value {
11 if size < 0 {
12 return reflect.MakeMapWithSize(t, 4)
13 }
14 return reflect.MakeMapWithSize(t, size)
15}