MCPcopy Create free account
hub / github.com/gogf/gf / Map

Method Map

container/gmap/gmap_hash_str_str_map.go:61–64  ·  view source on GitHub ↗

Map returns the underlying data map. Note that, if it's in concurrent-safe usage, it returns a copy of underlying data, or else a pointer to the underlying data.

()

Source from the content-addressed store, hash-verified

59// Note that, if it's in concurrent-safe usage, it returns a copy of underlying data,
60// or else a pointer to the underlying data.
61func (m *StrStrMap) Map() map[string]string {
62 m.lazyInit()
63 return m.KVMap.Map()
64}
65
66// MapStrAny returns a copy of the underlying data of the map as map[string]any.
67func (m *StrStrMap) MapStrAny() map[string]any {

Callers 15

Test_StrStrMap_VarFunction · 0.95
Test_StrStrMap_BasicFunction · 0.95
Test_StrStrMap_BatchFunction · 0.95
Test_StrStrMap_MergeFunction · 0.95
Test_StrStrMap_MapFunction · 0.95
ExampleStrStrMap_MapFunction · 0.95
ExampleStrStrMap_RemovesFunction · 0.95
ExampleStrStrMap_ClearFunction · 0.95
ExampleStrStrMap_ReplaceFunction · 0.95

Calls 2

lazyInitMethod · 0.95
MapMethod · 0.65

Tested by 15

Test_StrStrMap_VarFunction · 0.76
Test_StrStrMap_BasicFunction · 0.76
Test_StrStrMap_BatchFunction · 0.76
Test_StrStrMap_MergeFunction · 0.76
Test_StrStrMap_MapFunction · 0.76
ExampleStrStrMap_MapFunction · 0.76
ExampleStrStrMap_RemovesFunction · 0.76
ExampleStrStrMap_ClearFunction · 0.76
ExampleStrStrMap_ReplaceFunction · 0.76