Files
gf/g/container/gmap/gmap.go

19 lines
812 B
Go
Raw Normal View History

2018-01-03 10:38:53 +08:00
// Copyright 2017 gf Author(https://gitee.com/johng/gf). All Rights Reserved.
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
2018-02-28 12:01:14 +08:00
// 并发安全的哈希MAP.
2018-01-03 10:38:53 +08:00
package gmap
// 默认的Map对象其实就是InterfaceInterfaceMap的别名。
// 注意
// 1、这个Map是所有并发安全Map中效率最低的如果对效率要求比较高的场合请合理选择对应数据类型的Map
// 2、这个Map的优点是使用简便由于键值都是interface{}类型,因此对键值的数据类型要求不高;
// 3、底层实现比较类似于sync.Map
type Map = InterfaceInterfaceMap
func New(safe...bool) *Map {
return NewInterfaceInterfaceMap(safe...)
}