MCPcopy
hub / github.com/gogf/gf / ExampleStrStrMap_Removes

Function ExampleStrStrMap_Removes

container/gmap/gmap_z_example_str_str_test.go:323–342  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

321}
322
323func ExampleStrStrMap_Removes() {
324 var m gmap.StrStrMap
325 m.Sets(g.MapStrStr{
326 "k1": "v1",
327 "k2": "v2",
328 "k3": "v3",
329 "k4": "v4",
330 })
331
332 removeList := make([]string, 2)
333 removeList = append(removeList, "k1")
334 removeList = append(removeList, "k2")
335
336 m.Removes(removeList)
337
338 fmt.Println(m.Map())
339
340 // Output:
341 // map[k3:v3 k4:v4]
342}
343
344func ExampleStrStrMap_Keys() {
345 var m gmap.StrStrMap

Callers

nothing calls this directly

Calls 3

SetsMethod · 0.95
RemovesMethod · 0.95
MapMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…