MCPcopy
hub / github.com/duke-git/lancet / ExampleOrderedMap_Delete

Function ExampleOrderedMap_Delete

maputil/map_example_test.go:630–643  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

628}
629
630func ExampleOrderedMap_Delete() {
631 om := NewOrderedMap[string, int]()
632
633 om.Set("a", 1)
634 om.Set("b", 2)
635 om.Set("c", 3)
636
637 om.Delete("b")
638
639 fmt.Println(om.Keys())
640
641 // Output:
642 // [a c]
643}
644
645func ExampleOrderedMap_Clear() {
646 om := NewOrderedMap[string, int]()

Callers

nothing calls this directly

Calls 4

NewOrderedMapFunction · 0.85
SetMethod · 0.65
DeleteMethod · 0.65
KeysMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…